KEYIN
- the key input type to the MapperVALUEIN
- the value input type to the MapperKEYOUT
- the key output type from the MapperVALUEOUT
- the value output type from the Mapperpublic class MapContextImpl<KEYIN,VALUEIN,KEYOUT,VALUEOUT> extends TaskInputOutputContextImpl<KEYIN,VALUEIN,KEYOUT,VALUEOUT> implements MapContext<KEYIN,VALUEIN,KEYOUT,VALUEOUT>
Mapper
.TaskAttemptContextImpl.DummyReporter
conf, credentials, ugi
CACHE_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 |
---|
MapContextImpl(org.apache.hadoop.conf.Configuration conf,
TaskAttemptID taskid,
RecordReader<KEYIN,VALUEIN> reader,
RecordWriter<KEYOUT,VALUEOUT> writer,
OutputCommitter committer,
StatusReporter reporter,
InputSplit split) |
Modifier and Type | Method and Description |
---|---|
KEYIN |
getCurrentKey()
Get the current key.
|
VALUEIN |
getCurrentValue()
Get the current value.
|
InputSplit |
getInputSplit()
Get the input split for this map.
|
boolean |
nextKeyValue()
Advance to the next key, value pair, returning null if at end.
|
getOutputCommitter, write
getCounter, getCounter, getStatus, getTaskAttemptID, progress, setStatus, setStatusString
getArchiveClassPaths, 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, userClassesTakesPrecedence
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getOutputCommitter, write
getCounter, getCounter, getStatus, getTaskAttemptID, setStatus
getArchiveClassPaths, 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, userClassesTakesPrecedence
public MapContextImpl(org.apache.hadoop.conf.Configuration conf, TaskAttemptID taskid, RecordReader<KEYIN,VALUEIN> reader, RecordWriter<KEYOUT,VALUEOUT> writer, OutputCommitter committer, StatusReporter reporter, InputSplit split)
public InputSplit getInputSplit()
getInputSplit
in interface MapContext<KEYIN,VALUEIN,KEYOUT,VALUEOUT>
public KEYIN getCurrentKey() throws java.io.IOException, java.lang.InterruptedException
TaskInputOutputContextImpl
getCurrentKey
in interface TaskInputOutputContext<KEYIN,VALUEIN,KEYOUT,VALUEOUT>
getCurrentKey
in class TaskInputOutputContextImpl<KEYIN,VALUEIN,KEYOUT,VALUEOUT>
java.io.IOException
java.lang.InterruptedException
public VALUEIN getCurrentValue() throws java.io.IOException, java.lang.InterruptedException
TaskInputOutputContextImpl
getCurrentValue
in interface TaskInputOutputContext<KEYIN,VALUEIN,KEYOUT,VALUEOUT>
getCurrentValue
in class TaskInputOutputContextImpl<KEYIN,VALUEIN,KEYOUT,VALUEOUT>
java.io.IOException
java.lang.InterruptedException
public boolean nextKeyValue() throws java.io.IOException, java.lang.InterruptedException
TaskInputOutputContextImpl
nextKeyValue
in interface TaskInputOutputContext<KEYIN,VALUEIN,KEYOUT,VALUEOUT>
nextKeyValue
in class TaskInputOutputContextImpl<KEYIN,VALUEIN,KEYOUT,VALUEOUT>
java.io.IOException
java.lang.InterruptedException
Copyright © 2009 The Apache Software Foundation