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 TaskInputOutputContextImpl<KEYIN,VALUEIN,KEYOUT,VALUEOUT> extends TaskAttemptContextImpl implements TaskInputOutputContext<KEYIN,VALUEIN,KEYOUT,VALUEOUT>
TaskAttemptContextImpl.DummyReporterconf, credentials, ugiCACHE_ARCHIVES_VISIBILITIES, CACHE_FILE_VISIBILITIES, COMBINE_CLASS_ATTR, INPUT_FORMAT_CLASS_ATTR, JAR_UNPACK_PATTERN, JOB_ACL_MODIFY_JOB, JOB_ACL_VIEW_JOB, JOB_CANCEL_DELEGATION_TOKEN, JOB_NAMENODES, MAP_CLASS_ATTR, MAP_MEMORY_PHYSICAL_MB, MAP_OUTPUT_COLLECTOR_CLASS_ATTR, MAPREDUCE_TASK_CLASSPATH_PRECEDENCE, OUTPUT_FORMAT_CLASS_ATTR, PARTITIONER_CLASS_ATTR, REDUCE_CLASS_ATTR, REDUCE_MEMORY_PHYSICAL_MB, SHUFFLE_CONSUMER_PLUGIN_ATTR, USER_LOG_RETAIN_HOURS| Constructor and Description |
|---|
TaskInputOutputContextImpl(org.apache.hadoop.conf.Configuration conf,
TaskAttemptID taskid,
RecordWriter<KEYOUT,VALUEOUT> output,
OutputCommitter committer,
StatusReporter reporter) |
| Modifier and Type | Method and Description |
|---|---|
abstract KEYIN |
getCurrentKey()
Get the current key.
|
abstract VALUEIN |
getCurrentValue()
Get the current value.
|
OutputCommitter |
getOutputCommitter()
Get the
OutputCommitter for the task-attempt. |
abstract boolean |
nextKeyValue()
Advance to the next key, value pair, returning null if at end.
|
void |
write(KEYOUT key,
VALUEOUT value)
Generate an output key/value pair.
|
getCounter, getCounter, getStatus, getTaskAttemptID, progress, setStatus, setStatusStringgetArchiveClassPaths, getArchiveTimestamps, getCacheArchives, getCacheFiles, getCombinerClass, getCombinerKeyGroupingComparator, getConfiguration, getCredentials, getFileClassPaths, getFileTimestamps, getGroupingComparator, getInputFormatClass, getJar, getJobID, getJobName, getJobSetupCleanupNeeded, getLocalCacheArchives, getLocalCacheFiles, getMapOutputKeyClass, getMapOutputValueClass, getMapperClass, getMaxMapAttempts, getMaxReduceAttempts, getNumReduceTasks, getOutputFormatClass, getOutputKeyClass, getOutputValueClass, getPartitionerClass, getProfileEnabled, getProfileParams, getProfileTaskRange, getReducerClass, getSortComparator, getSymlink, getUser, getWorkingDirectory, setJobID, userClassesTakesPrecedenceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCounter, getCounter, getStatus, getTaskAttemptID, setStatusgetArchiveClassPaths, getArchiveTimestamps, getCacheArchives, getCacheFiles, getCombinerClass, getCombinerKeyGroupingComparator, getConfiguration, getCredentials, getFileClassPaths, getFileTimestamps, getGroupingComparator, getInputFormatClass, getJar, getJobID, getJobName, getJobSetupCleanupNeeded, getLocalCacheArchives, getLocalCacheFiles, getMapOutputKeyClass, getMapOutputValueClass, getMapperClass, getMaxMapAttempts, getMaxReduceAttempts, getNumReduceTasks, getOutputFormatClass, getOutputKeyClass, getOutputValueClass, getPartitionerClass, getProfileEnabled, getProfileParams, getReducerClass, getSortComparator, getSymlink, getUser, getWorkingDirectory, userClassesTakesPrecedencepublic TaskInputOutputContextImpl(org.apache.hadoop.conf.Configuration conf,
TaskAttemptID taskid,
RecordWriter<KEYOUT,VALUEOUT> output,
OutputCommitter committer,
StatusReporter reporter)
public abstract boolean nextKeyValue()
throws java.io.IOException,
java.lang.InterruptedException
nextKeyValue in interface TaskInputOutputContext<KEYIN,VALUEIN,KEYOUT,VALUEOUT>java.io.IOExceptionjava.lang.InterruptedExceptionpublic abstract KEYIN getCurrentKey() throws java.io.IOException, java.lang.InterruptedException
getCurrentKey in interface TaskInputOutputContext<KEYIN,VALUEIN,KEYOUT,VALUEOUT>java.io.IOExceptionjava.lang.InterruptedExceptionpublic abstract VALUEIN getCurrentValue() throws java.io.IOException, java.lang.InterruptedException
getCurrentValue in interface TaskInputOutputContext<KEYIN,VALUEIN,KEYOUT,VALUEOUT>java.io.IOExceptionjava.lang.InterruptedExceptionpublic void write(KEYOUT key, VALUEOUT value) throws java.io.IOException, java.lang.InterruptedException
public OutputCommitter getOutputCommitter()
TaskInputOutputContextOutputCommitter for the task-attempt.getOutputCommitter in interface TaskInputOutputContext<KEYIN,VALUEIN,KEYOUT,VALUEOUT>OutputCommitter for the task-attemptCopyright © 2009 The Apache Software Foundation