|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.mapred.JobInProgress
public class JobInProgress
JobInProgress maintains all the info for keeping a Job on the straight and narrow. It keeps its JobProfile and its latest JobStatus, plus a set of tables for doing bookkeeping of its Tasks. ***********************************************************
Nested Class Summary | |
---|---|
static class |
JobInProgress.Counter
|
Constructor Summary | |
---|---|
protected |
JobInProgress(JobID jobid,
JobConf conf)
Create an almost empty JobInProgress, which can be used only for tests |
|
JobInProgress(JobID jobid,
JobTracker jobtracker,
JobConf default_conf)
Create a JobInProgress with the given job file, plus a handle to the tracker. |
|
JobInProgress(JobID jobid,
JobTracker jobtracker,
JobConf default_conf,
int rCount)
|
Method Summary | |
---|---|
void |
cleanUpMetrics()
Called when the job is complete |
boolean |
completedTask(TaskInProgress tip,
TaskStatus status)
A taskid assigned to this JobInProgress has reported in successfully. |
int |
desiredMaps()
|
int |
desiredReduces()
|
void |
failedTask(TaskInProgress tip,
TaskAttemptID taskid,
String reason,
TaskStatus.Phase phase,
TaskStatus.State state,
String trackerName)
Fail a task with a given reason, but without a status object. |
TaskStatus |
findFinishedMap(int mapId)
Find the details of someplace where a map has finished |
int |
finishedMaps()
|
int |
finishedReduces()
|
TaskInProgress[] |
getCleanupTasks()
Get the list of cleanup tasks |
Counters |
getCounters()
Returns the total job counters, by adding together the job, the map and the reduce counters. |
long |
getFinishTime()
|
Counters |
getJobCounters()
Returns the job-level counters. |
JobID |
getJobID()
|
long |
getLaunchTime()
|
Counters |
getMapCounters()
Returns map phase counters by summing over all map tasks in progress. |
TaskInProgress[] |
getMapTasks()
Get the list of map tasks |
JobPriority |
getPriority()
|
JobProfile |
getProfile()
|
Counters |
getReduceCounters()
Returns map phase counters by summing over all map tasks in progress. |
TaskInProgress[] |
getReduceTasks()
Get the list of reduce tasks |
Object |
getSchedulingInfo()
|
TaskInProgress[] |
getSetupTasks()
Get the list of setup tasks |
long |
getStartTime()
|
JobStatus |
getStatus()
|
TaskCompletionEvent[] |
getTaskCompletionEvents(int fromEventId,
int maxEvents)
|
TaskInProgress |
getTaskInProgress(TaskID tipid)
Return the TaskInProgress that matches the tipid. |
boolean |
hasSpeculativeMaps()
|
boolean |
hasSpeculativeReduces()
|
boolean |
inited()
Check if the job has been initialized. |
void |
initTasks()
Construct the splits, etc. |
void |
kill()
Kill the job and all its component tasks. |
org.apache.hadoop.mapred.Task |
obtainJobCleanupTask(TaskTrackerStatus tts,
int clusterSize,
int numUniqueHosts,
boolean isMapSlot)
Return a CleanupTask, if appropriate, to run on the given tasktracker |
org.apache.hadoop.mapred.Task |
obtainJobSetupTask(TaskTrackerStatus tts,
int clusterSize,
int numUniqueHosts,
boolean isMapSlot)
Return a SetupTask, if appropriate, to run on the given tasktracker |
org.apache.hadoop.mapred.Task |
obtainNewLocalMapTask(TaskTrackerStatus tts,
int clusterSize,
int numUniqueHosts)
|
org.apache.hadoop.mapred.Task |
obtainNewMapTask(TaskTrackerStatus tts,
int clusterSize,
int numUniqueHosts)
Return a MapTask, if appropriate, to run on the given tasktracker |
org.apache.hadoop.mapred.Task |
obtainNewMapTask(TaskTrackerStatus tts,
int clusterSize,
int numUniqueHosts,
int maxCacheLevel)
Return a MapTask, if appropriate, to run on the given tasktracker |
org.apache.hadoop.mapred.Task |
obtainNewNonLocalMapTask(TaskTrackerStatus tts,
int clusterSize,
int numUniqueHosts)
|
org.apache.hadoop.mapred.Task |
obtainNewReduceTask(TaskTrackerStatus tts,
int clusterSize,
int numUniqueHosts)
Return a ReduceTask, if appropriate, to run on the given tasktracker. |
org.apache.hadoop.mapred.Task |
obtainTaskCleanupTask(TaskTrackerStatus tts,
boolean isMapSlot)
|
int |
pendingMaps()
|
int |
pendingReduces()
|
Vector<TaskInProgress> |
reportCleanupTIPs(boolean shouldBeComplete)
Return a vector of cleanup TaskInProgress objects |
Vector<TaskInProgress> |
reportSetupTIPs(boolean shouldBeComplete)
Return a vector of setup TaskInProgress objects |
Vector<TaskInProgress> |
reportTasksInProgress(boolean shouldBeMap,
boolean shouldBeComplete)
Return a vector of completed TaskInProgress objects |
int |
runningMaps()
|
int |
runningReduces()
|
boolean |
scheduleReduces()
|
void |
setPriority(JobPriority priority)
|
void |
setSchedulingInfo(Object schedulingInfo)
|
void |
updateMetrics()
Called periodically by JobTrackerMetrics to update the metrics for this job. |
void |
updateTaskStatus(TaskInProgress tip,
TaskStatus status)
Assuming JobTracker is locked on entry. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected JobInProgress(JobID jobid, JobConf conf)
public JobInProgress(JobID jobid, JobTracker jobtracker, JobConf default_conf) throws IOException
IOException
public JobInProgress(JobID jobid, JobTracker jobtracker, JobConf default_conf, int rCount) throws IOException
IOException
Method Detail |
---|
public boolean hasSpeculativeMaps()
public boolean hasSpeculativeReduces()
public void updateMetrics()
public void cleanUpMetrics()
public boolean inited()
true
if the job has been initialized,
false
otherwisepublic void initTasks() throws IOException, org.apache.hadoop.mapred.JobInProgress.KillInterruptedException
IOException
org.apache.hadoop.mapred.JobInProgress.KillInterruptedException
public JobProfile getProfile()
public JobStatus getStatus()
public long getLaunchTime()
public long getStartTime()
public long getFinishTime()
public int desiredMaps()
public int finishedMaps()
public int desiredReduces()
public int runningMaps()
public int runningReduces()
public int finishedReduces()
public int pendingMaps()
public int pendingReduces()
public JobPriority getPriority()
public void setPriority(JobPriority priority)
public TaskInProgress[] getMapTasks()
public TaskInProgress[] getCleanupTasks()
public TaskInProgress[] getSetupTasks()
public TaskInProgress[] getReduceTasks()
public Vector<TaskInProgress> reportTasksInProgress(boolean shouldBeMap, boolean shouldBeComplete)
public Vector<TaskInProgress> reportCleanupTIPs(boolean shouldBeComplete)
public Vector<TaskInProgress> reportSetupTIPs(boolean shouldBeComplete)
public void updateTaskStatus(TaskInProgress tip, TaskStatus status)
JobTracker
is locked on entry.
public Counters getJobCounters()
public Counters getMapCounters()
public Counters getReduceCounters()
public Counters getCounters()
public org.apache.hadoop.mapred.Task obtainNewMapTask(TaskTrackerStatus tts, int clusterSize, int numUniqueHosts, int maxCacheLevel) throws IOException
IOException
public org.apache.hadoop.mapred.Task obtainNewMapTask(TaskTrackerStatus tts, int clusterSize, int numUniqueHosts) throws IOException
IOException
public org.apache.hadoop.mapred.Task obtainTaskCleanupTask(TaskTrackerStatus tts, boolean isMapSlot) throws IOException
IOException
public org.apache.hadoop.mapred.Task obtainNewLocalMapTask(TaskTrackerStatus tts, int clusterSize, int numUniqueHosts) throws IOException
IOException
public org.apache.hadoop.mapred.Task obtainNewNonLocalMapTask(TaskTrackerStatus tts, int clusterSize, int numUniqueHosts) throws IOException
IOException
public org.apache.hadoop.mapred.Task obtainJobCleanupTask(TaskTrackerStatus tts, int clusterSize, int numUniqueHosts, boolean isMapSlot) throws IOException
IOException
public org.apache.hadoop.mapred.Task obtainJobSetupTask(TaskTrackerStatus tts, int clusterSize, int numUniqueHosts, boolean isMapSlot) throws IOException
IOException
public boolean scheduleReduces()
public org.apache.hadoop.mapred.Task obtainNewReduceTask(TaskTrackerStatus tts, int clusterSize, int numUniqueHosts) throws IOException
IOException
public boolean completedTask(TaskInProgress tip, TaskStatus status)
public void kill()
public void failedTask(TaskInProgress tip, TaskAttemptID taskid, String reason, TaskStatus.Phase phase, TaskStatus.State state, String trackerName)
JobTracker
is locked on entry.
tip
- The task's tiptaskid
- The task idreason
- The reason that the task failedtrackerName
- The task tracker the task failed onpublic TaskInProgress getTaskInProgress(TaskID tipid)
public TaskStatus findFinishedMap(int mapId)
mapId
- the id of the map
public TaskCompletionEvent[] getTaskCompletionEvents(int fromEventId, int maxEvents)
public JobID getJobID()
public Object getSchedulingInfo()
public void setSchedulingInfo(Object schedulingInfo)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |