|
||||||||||
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
version 3 introduced to replace emitHearbeat/pollForNewTask/pollForTaskWithClosedJob with heartbeat(TaskTrackerStatus, boolean, boolean, short) |
Fields inherited from interface org.apache.hadoop.mapred.JobSubmissionProtocol |
---|
versionID |
Method Summary | |
---|---|
Vector |
completedJobs()
|
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)
|
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 map tasks that make up the job |
long |
getProtocolVersion(String protocol,
long clientVersion)
Return protocol version corresponding to protocol interface. |
TaskReport[] |
getReduceTaskReports(String jobid)
Grab a bunch of info on the reduce tasks that make up the job |
long |
getStartTime()
|
List<String> |
getTaskDiagnostics(String jobId,
String tipId,
String taskId)
Get the diagnostics for a given task |
org.apache.hadoop.mapred.TaskTrackerStatus |
getTaskTracker(String trackerID)
|
int |
getTotalSubmissions()
|
static JobTracker |
getTracker()
|
int |
getTrackerPort()
|
org.apache.hadoop.mapred.HeartbeatResponse |
heartbeat(org.apache.hadoop.mapred.TaskTrackerStatus status,
boolean initialContact,
boolean acceptNewTasks,
short responseId)
The periodic heartbeat mechanism between the TaskTracker and
the JobTracker . |
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 |
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
heartbeat(TaskTrackerStatus, boolean, boolean, short)
public static final int TRACKERS_OK
public static final int UNKNOWN_TASKTRACKER
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) throws IOException
VersionedProtocol
getProtocolVersion
in interface VersionedProtocol
protocol
- The classname of the protocol interfaceclientVersion
- The version of the protocol that the client speaks
IOException
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 org.apache.hadoop.mapred.HeartbeatResponse heartbeat(org.apache.hadoop.mapred.TaskTrackerStatus status, boolean initialContact, boolean acceptNewTasks, short responseId) throws IOException
TaskTracker
and
the JobTracker
.
The JobTracker
processes the status information sent by the
TaskTracker
and responds with instructions to start/stop
tasks or jobs, and also 'reset' instructions during contingencies.
status
- the status updateinitialContact
- true
if this is first interaction since
'refresh', false
otherwise.acceptNewTasks
- true
if the TaskTracker
is
ready to accept new tasks to run.responseId
- the last responseId successfully acted upon by the
TaskTracker
.
HeartbeatResponse
with
fresh instructions.
IOException
public org.apache.hadoop.mapred.MapOutputLocation[] locateMapOutputs(String jobId, int[] mapTasksNeeded, int reduce) throws IOException
jobId
- the job idmapTasksNeeded
- an array of the mapIds that we needreduce
- the reduce's id
IOException
public String getFilesystemName() throws IOException
getFilesystemName
in interface JobSubmissionProtocol
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
submitJob
in interface JobSubmissionProtocol
IOException
public ClusterStatus getClusterStatus()
JobSubmissionProtocol
getClusterStatus
in interface JobSubmissionProtocol
public void killJob(String jobid)
JobSubmissionProtocol
killJob
in interface JobSubmissionProtocol
public JobProfile getJobProfile(String jobid)
JobSubmissionProtocol
getJobProfile
in interface JobSubmissionProtocol
public JobStatus getJobStatus(String jobid)
JobSubmissionProtocol
getJobStatus
in interface JobSubmissionProtocol
public TaskReport[] getMapTaskReports(String jobid)
JobSubmissionProtocol
getMapTaskReports
in interface JobSubmissionProtocol
public TaskReport[] getReduceTaskReports(String jobid)
JobSubmissionProtocol
getReduceTaskReports
in interface JobSubmissionProtocol
public List<String> getTaskDiagnostics(String jobId, String tipId, String taskId)
jobId
- the id of the jobtipId
- the id of the tiptaskId
- the id of the task
public String getAssignedTracker(String taskId)
taskId
- the name of the task
public JobStatus[] jobsToComplete()
JobSubmissionProtocol
jobsToComplete
in interface JobSubmissionProtocol
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 |