org.apache.hadoop.mapreduce
Class TaskAttemptContext

java.lang.Object
  extended by org.apache.hadoop.mapreduce.JobContext
      extended by org.apache.hadoop.mapreduce.TaskAttemptContext
All Implemented Interfaces:
Progressable
Direct Known Subclasses:
TaskAttemptContext, TaskInputOutputContext

public class TaskAttemptContext
extends JobContext
implements Progressable

The context for task attempts.


Field Summary
 
Fields inherited from class org.apache.hadoop.mapreduce.JobContext
CACHE_ARCHIVES_VISIBILITIES, CACHE_FILE_VISIBILITIES, COMBINE_CLASS_ATTR, conf, credentials, INPUT_FORMAT_CLASS_ATTR, JOB_ACL_MODIFY_JOB, JOB_ACL_VIEW_JOB, JOB_CANCEL_DELEGATION_TOKEN, JOB_NAMENODES, MAP_CLASS_ATTR, OUTPUT_FORMAT_CLASS_ATTR, PARTITIONER_CLASS_ATTR, REDUCE_CLASS_ATTR, ugi, USER_LOG_RETAIN_HOURS
 
Constructor Summary
TaskAttemptContext(Configuration conf, TaskAttemptID taskId)
           
 
Method Summary
 String getStatus()
          Get the last set status message.
 TaskAttemptID getTaskAttemptID()
          Get the unique name for this task attempt.
 void progress()
          Report progress.
 void setStatus(String msg)
          Set the current status of the task to the given string.
 
Methods inherited from class org.apache.hadoop.mapreduce.JobContext
getCombinerClass, getConfiguration, getCredentials, getGroupingComparator, getInputFormatClass, getJar, getJobID, getJobName, getMapOutputKeyClass, getMapOutputValueClass, getMapperClass, getNumReduceTasks, getOutputFormatClass, getOutputKeyClass, getOutputValueClass, getPartitionerClass, getReducerClass, getSortComparator, getWorkingDirectory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TaskAttemptContext

public TaskAttemptContext(Configuration conf,
                          TaskAttemptID taskId)
Method Detail

getTaskAttemptID

public TaskAttemptID getTaskAttemptID()
Get the unique name for this task attempt.


setStatus

public void setStatus(String msg)
               throws IOException
Set the current status of the task to the given string.

Throws:
IOException

getStatus

public String getStatus()
Get the last set status message.

Returns:
the current status message

progress

public void progress()
Report progress. The subtypes actually do work in this method.

Specified by:
progress in interface Progressable


Copyright © 2009 The Apache Software Foundation