KEYIN
- the class of the input keysVALUEIN
- the class of the input valuesKEYOUT
- the class of the output keysVALUEOUT
- the class of the output valuespublic class ReduceContext<KEYIN,VALUEIN,KEYOUT,VALUEOUT> extends TaskInputOutputContext<KEYIN,VALUEIN,KEYOUT,VALUEOUT>
Reducer
.限定符和类型 | 类和说明 |
---|---|
protected class |
ReduceContext.ValueIterable |
protected class |
ReduceContext.ValueIterator |
限定符和类型 | 字段和说明 |
---|---|
protected Progressable |
reporter |
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
构造器和说明 |
---|
ReduceContext(Configuration conf,
TaskAttemptID taskid,
RawKeyValueIterator input,
Counter inputKeyCounter,
Counter inputValueCounter,
RecordWriter<KEYOUT,VALUEOUT> output,
OutputCommitter committer,
StatusReporter reporter,
RawComparator<KEYIN> comparator,
Class<KEYIN> keyClass,
Class<VALUEIN> valueClass) |
限定符和类型 | 方法和说明 |
---|---|
KEYIN |
getCurrentKey()
Get the current key.
|
VALUEIN |
getCurrentValue()
Get the current value.
|
Iterable<VALUEIN> |
getValues()
Iterate through the values for the current key, reusing the same value
object, which is stored in the context.
|
boolean |
nextKey()
Start processing next unique key.
|
boolean |
nextKeyValue()
Advance to the next key/value pair.
|
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
protected Progressable reporter
public ReduceContext(Configuration conf, TaskAttemptID taskid, RawKeyValueIterator input, Counter inputKeyCounter, Counter inputValueCounter, RecordWriter<KEYOUT,VALUEOUT> output, OutputCommitter committer, StatusReporter reporter, RawComparator<KEYIN> comparator, Class<KEYIN> keyClass, Class<VALUEIN> valueClass) throws InterruptedException, IOException
public boolean nextKey() throws IOException, InterruptedException
public boolean nextKeyValue() throws IOException, InterruptedException
nextKeyValue
在类中 TaskInputOutputContext<KEYIN,VALUEIN,KEYOUT,VALUEOUT>
IOException
InterruptedException
public KEYIN getCurrentKey()
TaskInputOutputContext
getCurrentKey
在类中 TaskInputOutputContext<KEYIN,VALUEIN,KEYOUT,VALUEOUT>
public VALUEIN getCurrentValue()
TaskInputOutputContext
getCurrentValue
在类中 TaskInputOutputContext<KEYIN,VALUEIN,KEYOUT,VALUEOUT>
public Iterable<VALUEIN> getValues() throws IOException, InterruptedException
IOException
InterruptedException
Copyright © 2009 The Apache Software Foundation