KEYIN - the input key type for the taskVALUEIN - the input value type for the taskKEYOUT - the output key type for the taskVALUEOUT - the output value type for the taskpublic abstract class TaskInputOutputContext<KEYIN,VALUEIN,KEYOUT,VALUEOUT> extends TaskAttemptContext implements Progressable
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| 构造器和说明 |
|---|
TaskInputOutputContext(Configuration conf,
TaskAttemptID taskid,
RecordWriter<KEYOUT,VALUEOUT> output,
OutputCommitter committer,
StatusReporter reporter) |
| 限定符和类型 | 方法和说明 |
|---|---|
Counter |
getCounter(Enum<?> counterName) |
Counter |
getCounter(String groupName,
String counterName) |
abstract KEYIN |
getCurrentKey()
Get the current key.
|
abstract VALUEIN |
getCurrentValue()
Get the current value.
|
OutputCommitter |
getOutputCommitter() |
float |
getProgress() |
abstract boolean |
nextKeyValue()
Advance to the next key, value pair, returning null if at end.
|
void |
progress()
Report progress.
|
void |
setStatus(String status)
Set the current status of the task to the given string.
|
void |
write(KEYOUT key,
VALUEOUT value)
Generate an output key/value pair.
|
getStatus, getTaskAttemptIDgetCombinerClass, getConfiguration, getCredentials, getGroupingComparator, getInputFormatClass, getJar, getJobID, getJobName, getMapOutputKeyClass, getMapOutputValueClass, getMapperClass, getNumReduceTasks, getOutputFormatClass, getOutputKeyClass, getOutputValueClass, getPartitionerClass, getReducerClass, getSortComparator, getWorkingDirectorypublic TaskInputOutputContext(Configuration conf, TaskAttemptID taskid, RecordWriter<KEYOUT,VALUEOUT> output, OutputCommitter committer, StatusReporter reporter)
public abstract boolean nextKeyValue()
throws IOException,
InterruptedException
IOExceptionInterruptedExceptionpublic abstract KEYIN getCurrentKey() throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic abstract VALUEIN getCurrentValue() throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic void write(KEYOUT key, VALUEOUT value) throws IOException, InterruptedException
public void progress()
TaskAttemptContextprogress 在接口中 Progressableprogress 在类中 TaskAttemptContextpublic float getProgress()
public void setStatus(String status)
TaskAttemptContextsetStatus 在类中 TaskAttemptContextpublic OutputCommitter getOutputCommitter()
Copyright © 2009 The Apache Software Foundation