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 MapContext<KEYIN,VALUEIN,KEYOUT,VALUEOUT> extends TaskInputOutputContext<KEYIN,VALUEIN,KEYOUT,VALUEOUT>
Mapper
.COMBINE_CLASS_ATTR, conf, INPUT_FORMAT_CLASS_ATTR, MAP_CLASS_ATTR, OUTPUT_FORMAT_CLASS_ATTR, PARTITIONER_CLASS_ATTR, REDUCE_CLASS_ATTR
Constructor and Description |
---|
MapContext(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.
|
getCounter, getCounter, getOutputCommitter, progress, setStatus, write
getStatus, getTaskAttemptID
getCombinerClass, getConfiguration, getGroupingComparator, getInputFormatClass, getJar, getJobID, getJobName, getMapOutputKeyClass, getMapOutputValueClass, getMapperClass, getNumReduceTasks, getOutputFormatClass, getOutputKeyClass, getOutputValueClass, getPartitionerClass, getReducerClass, getSortComparator, getWorkingDirectory
public MapContext(Configuration conf, TaskAttemptID taskid, RecordReader<KEYIN,VALUEIN> reader, RecordWriter<KEYOUT,VALUEOUT> writer, OutputCommitter committer, StatusReporter reporter, InputSplit split)
public InputSplit getInputSplit()
public KEYIN getCurrentKey() throws IOException, InterruptedException
TaskInputOutputContext
getCurrentKey
in class TaskInputOutputContext<KEYIN,VALUEIN,KEYOUT,VALUEOUT>
IOException
InterruptedException
public VALUEIN getCurrentValue() throws IOException, InterruptedException
TaskInputOutputContext
getCurrentValue
in class TaskInputOutputContext<KEYIN,VALUEIN,KEYOUT,VALUEOUT>
IOException
InterruptedException
public boolean nextKeyValue() throws IOException, InterruptedException
TaskInputOutputContext
nextKeyValue
in class TaskInputOutputContext<KEYIN,VALUEIN,KEYOUT,VALUEOUT>
IOException
InterruptedException
Copyright © 2010 The Apache Software Foundation