org.apache.hadoop.mapred
Interface JobSubmissionProtocol

All Superinterfaces:
VersionedProtocol
All Known Implementing Classes:
JobTracker

public interface JobSubmissionProtocol
extends VersionedProtocol

Protocol that a JobClient and the central JobTracker use to communicate. The JobClient can use these methods to submit a Job for execution, and learn about the current system status.


Field Summary
static long versionID
           
 
Method Summary
 JobStatus[] getAllJobs()
          Get all the jobs submitted.
 ClusterStatus getClusterStatus()
          Get the current status of the cluster
 String getFilesystemName()
          A MapReduce system always operates on a single filesystem.
 Counters getJobCounters(String jobid)
          Grab the current job counters
 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.
 TaskReport[] getMapTaskReports(String jobid)
          Grab a bunch of info on the map tasks that make up the job
 String getNewJobId()
          Allocate a name for the job.
 TaskReport[] getReduceTaskReports(String jobid)
          Grab a bunch of info on the reduce tasks that make up the job
 TaskCompletionEvent[] getTaskCompletionEvents(String jobid, int fromEventId, int maxEvents)
          Get task completion events for the jobid, starting from fromEventId.
 String[] getTaskDiagnostics(String jobId, String tipId, String taskId)
          Get the diagnostics for a given task in a given job
 JobStatus[] jobsToComplete()
          Get the jobs that are not completed and not failed
 void killJob(String jobid)
          Kill the indicated job
 boolean killTask(String taskId, boolean shouldFail)
          Kill indicated task attempt.
 JobStatus submitJob(String jobName)
          Submit a Job for execution.
 
Methods inherited from interface org.apache.hadoop.ipc.VersionedProtocol
getProtocolVersion
 

Field Detail

versionID

static final long versionID
See Also:
Constant Field Values
Method Detail

getNewJobId

String getNewJobId()
                   throws IOException
Allocate a name for the job.

Returns:
a unique job name for submitting jobs.
Throws:
IOException

submitJob

JobStatus submitJob(String jobName)
                    throws IOException
Submit a Job for execution. Returns the latest profile for that job. The job files should be submitted in system-dir/jobName.

Throws:
IOException

getClusterStatus

ClusterStatus getClusterStatus()
                               throws IOException
Get the current status of the cluster

Returns:
summary of the state of the cluster
Throws:
IOException

killJob

void killJob(String jobid)
             throws IOException
Kill the indicated job

Throws:
IOException

killTask

boolean killTask(String taskId,
                 boolean shouldFail)
                 throws IOException
Kill indicated task attempt.

Parameters:
taskId - the id of the task to kill.
shouldFail - if true the task is failed and added to failed tasks list, otherwise it is just killed, w/o affecting job failure status.
Throws:
IOException

getJobProfile

JobProfile getJobProfile(String jobid)
                         throws IOException
Grab a handle to a job that is already known to the JobTracker.

Returns:
Profile of the job, or null if not found.
Throws:
IOException

getJobStatus

JobStatus getJobStatus(String jobid)
                       throws IOException
Grab a handle to a job that is already known to the JobTracker.

Returns:
Status of the job, or null if not found.
Throws:
IOException

getJobCounters

Counters getJobCounters(String jobid)
                        throws IOException
Grab the current job counters

Throws:
IOException

getMapTaskReports

TaskReport[] getMapTaskReports(String jobid)
                               throws IOException
Grab a bunch of info on the map tasks that make up the job

Throws:
IOException

getReduceTaskReports

TaskReport[] getReduceTaskReports(String jobid)
                                  throws IOException
Grab a bunch of info on the reduce tasks that make up the job

Throws:
IOException

getFilesystemName

String getFilesystemName()
                         throws IOException
A MapReduce system always operates on a single filesystem. This function returns the fs name. ('local' if the localfs; 'addr:port' if dfs). The client can then copy files into the right locations prior to submitting the job.

Throws:
IOException

jobsToComplete

JobStatus[] jobsToComplete()
                           throws IOException
Get the jobs that are not completed and not failed

Returns:
array of JobStatus for the running/to-be-run jobs.
Throws:
IOException

getAllJobs

JobStatus[] getAllJobs()
                       throws IOException
Get all the jobs submitted.

Returns:
array of JobStatus for the submitted jobs
Throws:
IOException

getTaskCompletionEvents

TaskCompletionEvent[] getTaskCompletionEvents(String jobid,
                                              int fromEventId,
                                              int maxEvents)
                                              throws IOException
Get task completion events for the jobid, starting from fromEventId. Returns empty aray if no events are available.

Parameters:
jobid - job id
fromEventId - event id to start from.
maxEvents - the max number of events we want to look at
Returns:
array of task completion events.
Throws:
IOException

getTaskDiagnostics

String[] getTaskDiagnostics(String jobId,
                            String tipId,
                            String taskId)
                            throws IOException
Get the diagnostics for a given task in a given job

Parameters:
jobId - the id of the job
Returns:
an array of the diagnostic messages
Throws:
IOException


Copyright © 2006 The Apache Software Foundation