|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.mapreduce.server.jobtracker.TaskTracker
public class TaskTracker
The representation of a single TaskTracker as seen by
the JobTracker.
| Constructor Summary | |
|---|---|
TaskTracker(String trackerName)
Create a new TaskTracker. |
|
| Method Summary | |
|---|---|
void |
cancelAllReservations()
Cleanup when the TaskTracker is declared as 'lost/blacklisted'
by the JobTracker. |
int |
getAvailableSlots(TaskType taskType)
Get the number of currently available slots on this tasktracker for the given type of the task. |
JobInProgress |
getJobForFallowSlot(TaskType taskType)
Get the JobInProgress for which the fallow slot(s) are held. |
TaskTrackerStatus |
getStatus()
Get the current TaskTrackerStatus of the TaskTracker. |
String |
getTrackerName()
Get the unique identifier for the TaskTracker |
void |
reserveSlots(TaskType taskType,
JobInProgress job,
int numSlots)
Reserve specified number of slots for a given job. |
void |
setStatus(TaskTrackerStatus status)
Set the current TaskTrackerStatus of the TaskTracker. |
void |
unreserveSlots(TaskType taskType,
JobInProgress job)
Free map slots on this TaskTracker which were reserved for
taskType. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TaskTracker(String trackerName)
TaskTracker.
trackerName - Unique identifier for the TaskTracker| Method Detail |
|---|
public String getTrackerName()
TaskTracker
TaskTrackerpublic TaskTrackerStatus getStatus()
TaskTrackerStatus of the TaskTracker.
TaskTrackerStatus of the
TaskTrackerpublic void setStatus(TaskTrackerStatus status)
TaskTrackerStatus of the TaskTracker.
status - the current TaskTrackerStatus of the
TaskTrackerpublic int getAvailableSlots(TaskType taskType)
taskType - the TaskType to check for number of available slots
taskTypepublic JobInProgress getJobForFallowSlot(TaskType taskType)
JobInProgress for which the fallow slot(s) are held.
taskType - TaskType of the task
null if there are no fallow slots
public void reserveSlots(TaskType taskType,
JobInProgress job,
int numSlots)
job.
taskType - TaskType of the taskjob - the job for which slots on this TaskTracker
are to be reservednumSlots - number of slots to be reserved
public void unreserveSlots(TaskType taskType,
JobInProgress job)
TaskTracker which were reserved for
taskType.
taskType - TaskType of the taskjob - job whose slots are being un-reservedpublic void cancelAllReservations()
TaskTracker is declared as 'lost/blacklisted'
by the JobTracker.
The method assumes that the lock on the JobTracker is obtained
by the caller.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||