org.apache.hadoop.mapreduce.task
Class MapContextImpl<KEYIN,VALUEIN,KEYOUT,VALUEOUT>
java.lang.Object
org.apache.hadoop.mapreduce.task.JobContextImpl
org.apache.hadoop.mapreduce.task.TaskAttemptContextImpl
org.apache.hadoop.mapreduce.task.TaskInputOutputContextImpl<KEYIN,VALUEIN,KEYOUT,VALUEOUT>
org.apache.hadoop.mapreduce.task.MapContextImpl<KEYIN,VALUEIN,KEYOUT,VALUEOUT>
- Type Parameters:
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 Mapper
- All Implemented Interfaces:
- JobContext, MapContext<KEYIN,VALUEIN,KEYOUT,VALUEOUT>, TaskAttemptContext, TaskInputOutputContext<KEYIN,VALUEIN,KEYOUT,VALUEOUT>, org.apache.hadoop.util.Progressable
public class MapContextImpl<KEYIN,VALUEIN,KEYOUT,VALUEOUT>
- extends TaskInputOutputContextImpl<KEYIN,VALUEIN,KEYOUT,VALUEOUT>
- implements MapContext<KEYIN,VALUEIN,KEYOUT,VALUEOUT>
The context that is given to the Mapper
.
Fields inherited from interface org.apache.hadoop.mapreduce.JobContext |
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 |
Methods inherited from class org.apache.hadoop.mapreduce.task.JobContextImpl |
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 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.hadoop.mapreduce.JobContext |
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 |
Methods inherited from interface org.apache.hadoop.util.Progressable |
progress |
MapContextImpl
public MapContextImpl(org.apache.hadoop.conf.Configuration conf,
TaskAttemptID taskid,
RecordReader<KEYIN,VALUEIN> reader,
RecordWriter<KEYOUT,VALUEOUT> writer,
OutputCommitter committer,
StatusReporter reporter,
InputSplit split)
getInputSplit
public InputSplit getInputSplit()
- Get the input split for this map.
- Specified by:
getInputSplit
in interface MapContext<KEYIN,VALUEIN,KEYOUT,VALUEOUT>
getCurrentKey
public KEYIN getCurrentKey()
throws java.io.IOException,
java.lang.InterruptedException
- Description copied from class:
TaskInputOutputContextImpl
- Get the current key.
- Specified by:
getCurrentKey
in interface TaskInputOutputContext<KEYIN,VALUEIN,KEYOUT,VALUEOUT>
- Specified by:
getCurrentKey
in class TaskInputOutputContextImpl<KEYIN,VALUEIN,KEYOUT,VALUEOUT>
- Returns:
- the current key object or null if there isn't one
- Throws:
java.io.IOException
java.lang.InterruptedException
getCurrentValue
public VALUEIN getCurrentValue()
throws java.io.IOException,
java.lang.InterruptedException
- Description copied from class:
TaskInputOutputContextImpl
- Get the current value.
- Specified by:
getCurrentValue
in interface TaskInputOutputContext<KEYIN,VALUEIN,KEYOUT,VALUEOUT>
- Specified by:
getCurrentValue
in class TaskInputOutputContextImpl<KEYIN,VALUEIN,KEYOUT,VALUEOUT>
- Returns:
- the value object that was read into
- Throws:
java.io.IOException
java.lang.InterruptedException
nextKeyValue
public boolean nextKeyValue()
throws java.io.IOException,
java.lang.InterruptedException
- Description copied from class:
TaskInputOutputContextImpl
- Advance to the next key, value pair, returning null if at end.
- Specified by:
nextKeyValue
in interface TaskInputOutputContext<KEYIN,VALUEIN,KEYOUT,VALUEOUT>
- Specified by:
nextKeyValue
in class TaskInputOutputContextImpl<KEYIN,VALUEIN,KEYOUT,VALUEOUT>
- Returns:
- the key object that was read into, or null if no more
- Throws:
java.io.IOException
java.lang.InterruptedException
Copyright © 2009 The Apache Software Foundation