|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.mapred.JobTracker
public class JobTracker
JobTracker is the central location for submitting and tracking MR jobs in a network environment.
Field Summary | |
---|---|
static int |
FILE_NOT_FOUND
|
static long |
HEARTBEAT_INTERVAL
|
static org.apache.commons.logging.Log |
LOG
|
static int |
SUCCESS
|
static long |
TASKTRACKER_EXPIRY_INTERVAL
|
static int |
TRACKERS_OK
|
static int |
UNKNOWN_TASKTRACKER
|
static long |
versionID
|
static long |
versionID
|
Method Summary | |
---|---|
Vector |
completedJobs()
|
int |
emitHeartbeat(org.apache.hadoop.mapred.TaskTrackerStatus trackerStatus,
boolean initialContact)
Process incoming heartbeat messages from the task trackers. |
Vector |
failedJobs()
|
static InetSocketAddress |
getAddress(Configuration conf)
|
String |
getAssignedTracker(String taskId)
Get tracker name for a given task id. |
ClusterStatus |
getClusterStatus()
Get the current status of the cluster |
String |
getFilesystemName()
Grab the local fs name |
int |
getInfoPort()
|
org.apache.hadoop.mapred.JobInProgress |
getJob(String jobid)
|
org.apache.hadoop.mapred.JobProfile |
getJobProfile(String jobid)
Grab a handle to a job that is already known to the JobTracker |
JobStatus |
getJobStatus(String jobid)
Grab a handle to a job that is already known to the JobTracker |
String |
getJobTrackerMachine()
|
TaskReport[] |
getMapTaskReports(String jobid)
Grab a bunch of info on the tasks that make up the job |
long |
getProtocolVersion(String protocol,
long clientVersion)
Return protocol version corresponding to protocol interface. |
TaskReport[] |
getReduceTaskReports(String jobid)
|
long |
getStartTime()
|
org.apache.hadoop.mapred.TaskTrackerStatus |
getTaskTracker(String trackerID)
|
int |
getTotalSubmissions()
|
static JobTracker |
getTracker()
|
int |
getTrackerPort()
|
JobStatus[] |
jobsToComplete()
Get the jobs that are not completed and not failed |
void |
killJob(String jobid)
Kill the indicated job |
org.apache.hadoop.mapred.MapOutputLocation[] |
locateMapOutputs(String jobId,
int[] mapTasksNeeded,
int reduce)
A TaskTracker wants to know the physical locations of completed, but not yet closed, tasks. |
static void |
main(String[] argv)
Start the JobTracker process. |
void |
offerService()
Run forever |
org.apache.hadoop.mapred.Task |
pollForNewTask(String taskTracker)
A tracker wants to know if there's a Task to run. |
String[] |
pollForTaskWithClosedJob(String taskTracker)
A tracker wants to know if any of its Tasks have been closed (because the job completed, whether successfully or not) |
void |
reportTaskTrackerError(String taskTracker,
String errorClass,
String errorMessage)
Report a problem to the job tracker. |
Vector |
runningJobs()
|
static void |
startTracker(Configuration conf)
|
static void |
stopTracker()
|
JobStatus |
submitJob(String jobFile)
JobTracker.submitJob() kicks off a new job. |
Collection |
taskTrackers()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final org.apache.commons.logging.Log LOG
public static final long HEARTBEAT_INTERVAL
public static final long TASKTRACKER_EXPIRY_INTERVAL
public static final int SUCCESS
public static final int FILE_NOT_FOUND
public static final long versionID
public static final int TRACKERS_OK
public static final int UNKNOWN_TASKTRACKER
public static final long versionID
Method Detail |
---|
public static void startTracker(Configuration conf) throws IOException
IOException
public static JobTracker getTracker()
public static void stopTracker() throws IOException
IOException
public long getProtocolVersion(String protocol, long clientVersion)
VersionedProtocol
protocol
- The classname of the protocol interfaceclientVersion
- The version of the protocol that the client speaks
public static InetSocketAddress getAddress(Configuration conf)
public void offerService()
public int getTotalSubmissions()
public String getJobTrackerMachine()
public int getTrackerPort()
public int getInfoPort()
public long getStartTime()
public Vector runningJobs()
public Vector failedJobs()
public Vector completedJobs()
public Collection taskTrackers()
public org.apache.hadoop.mapred.TaskTrackerStatus getTaskTracker(String trackerID)
public int emitHeartbeat(org.apache.hadoop.mapred.TaskTrackerStatus trackerStatus, boolean initialContact)
public org.apache.hadoop.mapred.Task pollForNewTask(String taskTracker)
public String[] pollForTaskWithClosedJob(String taskTracker)
public org.apache.hadoop.mapred.MapOutputLocation[] locateMapOutputs(String jobId, int[] mapTasksNeeded, int reduce)
jobId
- the job idmapTasksNeeded
- an array of the mapIds that we needreduce
- the reduce's id
public String getFilesystemName() throws IOException
IOException
public void reportTaskTrackerError(String taskTracker, String errorClass, String errorMessage) throws IOException
taskTracker
- the name of the task trackererrorClass
- the kind of error (eg. the class that was thrown)errorMessage
- the human readable error message
IOException
- if there was a problem in communication or on the
remote sidepublic JobStatus submitJob(String jobFile) throws IOException
IOException
public ClusterStatus getClusterStatus()
public void killJob(String jobid)
public org.apache.hadoop.mapred.JobProfile getJobProfile(String jobid)
public JobStatus getJobStatus(String jobid)
public TaskReport[] getMapTaskReports(String jobid)
public TaskReport[] getReduceTaskReports(String jobid)
public String getAssignedTracker(String taskId)
taskId
- the name of the task
public JobStatus[] jobsToComplete()
public org.apache.hadoop.mapred.JobInProgress getJob(String jobid)
public static void main(String[] argv) throws IOException, InterruptedException
IOException
InterruptedException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |