@InterfaceAudience.Public @InterfaceStability.Stable public interface RunningJob
RunningJob is the user-interface to query for details on a
running Map-Reduce job.
Clients can get hold of RunningJob via the JobClient
and then query the running-job for details such as name, configuration,
progress etc.
JobClient| Modifier and Type | Method and Description |
|---|---|
float |
cleanupProgress()
Get the progress of the job's cleanup-tasks, as a float between 0.0
and 1.0.
|
Configuration |
getConfiguration()
Get the underlying job configuration
|
Counters |
getCounters()
Gets the counters for this job.
|
String |
getFailureInfo()
Get failure info for the job.
|
String |
getHistoryUrl()
Get the url where history file is archived.
|
JobID |
getID()
Get the job identifier.
|
String |
getJobFile()
Get the path of the submitted job configuration.
|
String |
getJobID()
Deprecated.
This method is deprecated and will be removed. Applications should
rather use
getID(). |
String |
getJobName()
Get the name of the job.
|
int |
getJobState()
Returns the current state of the Job.
|
JobStatus |
getJobStatus()
Returns a snapshot of the current status,
JobStatus, of the Job. |
TaskCompletionEvent[] |
getTaskCompletionEvents(int startFrom)
Get events indicating completion (success/failure) of component tasks.
|
String[] |
getTaskDiagnostics(TaskAttemptID taskid)
Gets the diagnostic messages for a given task attempt.
|
String |
getTrackingURL()
Get the URL where some job progress information will be displayed.
|
boolean |
isComplete()
Check if the job is finished or not.
|
boolean |
isRetired()
Check whether the job has been removed from JobTracker memory and retired.
|
boolean |
isSuccessful()
Check if the job completed successfully.
|
void |
killJob()
Kill the running job.
|
void |
killTask(String taskId,
boolean shouldFail)
Deprecated.
Applications should rather use
killTask(TaskAttemptID, boolean) |
void |
killTask(TaskAttemptID taskId,
boolean shouldFail)
Kill indicated task attempt.
|
float |
mapProgress()
Get the progress of the job's map-tasks, as a float between 0.0
and 1.0.
|
float |
reduceProgress()
Get the progress of the job's reduce-tasks, as a float between 0.0
and 1.0.
|
void |
setJobPriority(String priority)
Set the priority of a running job.
|
float |
setupProgress()
Get the progress of the job's setup-tasks, as a float between 0.0
and 1.0.
|
void |
waitForCompletion()
Blocks until the job is complete.
|
Configuration getConfiguration()
@Deprecated String getJobID()
getID().String getJobName()
String getJobFile()
String getTrackingURL()
float mapProgress() throws IOException
IOExceptionfloat reduceProgress() throws IOException
IOExceptionfloat cleanupProgress() throws IOException
IOExceptionfloat setupProgress() throws IOException
IOExceptionboolean isComplete() throws IOException
true if the job is complete, else false.IOExceptionboolean isSuccessful() throws IOException
true if the job succeeded, else false.IOExceptionvoid waitForCompletion() throws IOException
IOExceptionint getJobState() throws IOException
JobStatusIOExceptionJobStatus getJobStatus() throws IOException
JobStatus, of the Job.
Need to call again for latest information.IOExceptionvoid killJob() throws IOException
IOExceptionvoid setJobPriority(String priority) throws IOException
priority - the new priority for the job.IOExceptionTaskCompletionEvent[] getTaskCompletionEvents(int startFrom) throws IOException
startFrom - index to start fetching events fromTaskCompletionEventsIOExceptionvoid killTask(TaskAttemptID taskId, boolean shouldFail) throws IOException
taskId - the id of the task to be terminated.shouldFail - if true the task is failed and added to failed tasks
list, otherwise it is just killed, w/o affecting
job failure status.IOException@Deprecated void killTask(String taskId, boolean shouldFail) throws IOException
killTask(TaskAttemptID, boolean)IOExceptionCounters getCounters() throws IOException
IOExceptionString[] getTaskDiagnostics(TaskAttemptID taskid) throws IOException
taskid - IOExceptionString getHistoryUrl() throws IOException
IOExceptionboolean isRetired() throws IOException
getHistoryUrl()true if the job retired, else false.IOExceptionString getFailureInfo() throws IOException
IOExceptionCopyright © 2015 Apache Software Foundation. All rights reserved.