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
.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
构造器和说明 |
---|
MapContext(Configuration conf,
TaskAttemptID taskid,
RecordReader<KEYIN,VALUEIN> reader,
RecordWriter<KEYOUT,VALUEOUT> writer,
OutputCommitter committer,
StatusReporter reporter,
InputSplit split) |
限定符和类型 | 方法和说明 |
---|---|
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, getProgress, progress, setStatus, write
getStatus, getTaskAttemptID
getCombinerClass, getConfiguration, getCredentials, 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
在类中 TaskInputOutputContext<KEYIN,VALUEIN,KEYOUT,VALUEOUT>
IOException
InterruptedException
public VALUEIN getCurrentValue() throws IOException, InterruptedException
TaskInputOutputContext
getCurrentValue
在类中 TaskInputOutputContext<KEYIN,VALUEIN,KEYOUT,VALUEOUT>
IOException
InterruptedException
public boolean nextKeyValue() throws IOException, InterruptedException
TaskInputOutputContext
nextKeyValue
在类中 TaskInputOutputContext<KEYIN,VALUEIN,KEYOUT,VALUEOUT>
IOException
InterruptedException
Copyright © 2009 The Apache Software Foundation