|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectp2pMapReduce.mapreduceModule.JobContextImpl
p2pMapReduce.mapreduceModule.TaskAttemptContextImpl
p2pMapReduce.mapreduceModule.TaskInputOutputContextImpl<KEYIN,VALUEIN,KEYOUT,VALUEOUT>
KEYIN
- the input key type for the taskVALUEIN
- the input value type for the taskKEYOUT
- the output key type for the taskVALUEOUT
- the output value type for the taskpublic abstract class TaskInputOutputContextImpl<KEYIN,VALUEIN,KEYOUT,VALUEOUT>
A context object that allows input and output from the task. It is only
supplied to the Mapper
or Reducer
.
Field Summary |
---|
Fields inherited from class p2pMapReduce.mapreduceModule.JobContextImpl |
---|
conf |
Constructor Summary | |
---|---|
TaskInputOutputContextImpl(Configuration conf,
TaskAttemptID taskid,
RecordWriter<KEYOUT,VALUEOUT> output,
OutputCommitter committer,
StatusReporter reporter)
|
Method Summary | |
---|---|
Counter |
getCounter(java.lang.Enum<?> counterName)
Get the Counter for the given counterName . |
Counter |
getCounter(java.lang.String groupName,
java.lang.String counterName)
Get the Counter for the given groupName and
counterName . |
abstract KEYIN |
getCurrentKey()
Get the current key. |
abstract VALUEIN |
getCurrentValue()
Get the current value. |
OutputCommitter |
getOutputCommitter()
Get the OutputCommitter for the task-attempt. |
abstract boolean |
nextKeyValue()
Advance to the next key, value pair, returning null if at end. |
void |
write(KEYOUT key,
VALUEOUT value)
Generate an output key/value pair. |
Methods inherited from class p2pMapReduce.mapreduceModule.TaskAttemptContextImpl |
---|
getStatus, getTaskAttemptID, setStatus |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface p2pMapReduce.mapreduceModule.TaskAttemptContext |
---|
getStatus, getTaskAttemptID, setStatus |
Methods inherited from interface p2pMapReduce.mapreduceModule.JobContext |
---|
getCombinerClass, getConfiguration, getInputFormatClass, getJar, getJobID, getJobName, getJobSetupCleanupNeeded, getMapOutputKeyClass, getMapOutputValueClass, getMapperClass, getMaxMapAttempts, getMaxReduceAttempts, getNumReduceTasks, getOutputFormatClass, getOutputKeyClass, getOutputValueClass, getPartitionerClass, getProfileEnabled, getProfileParams, getProfileTaskRange, getReducerClass, getSortComparator, getUser, getWorkingDirectory |
Constructor Detail |
---|
public TaskInputOutputContextImpl(Configuration conf, TaskAttemptID taskid, RecordWriter<KEYOUT,VALUEOUT> output, OutputCommitter committer, StatusReporter reporter)
Method Detail |
---|
public abstract boolean nextKeyValue() throws java.io.IOException, java.lang.InterruptedException
nextKeyValue
in interface TaskInputOutputContext<KEYIN,VALUEIN,KEYOUT,VALUEOUT>
java.io.IOException
java.lang.InterruptedException
public abstract KEYIN getCurrentKey() throws java.io.IOException, java.lang.InterruptedException
getCurrentKey
in interface TaskInputOutputContext<KEYIN,VALUEIN,KEYOUT,VALUEOUT>
java.io.IOException
java.lang.InterruptedException
public abstract VALUEIN getCurrentValue() throws java.io.IOException, java.lang.InterruptedException
getCurrentValue
in interface TaskInputOutputContext<KEYIN,VALUEIN,KEYOUT,VALUEOUT>
java.io.IOException
java.lang.InterruptedException
public void write(KEYOUT key, VALUEOUT value) throws java.io.IOException, java.lang.InterruptedException
write
in interface TaskInputOutputContext<KEYIN,VALUEIN,KEYOUT,VALUEOUT>
java.io.IOException
java.lang.InterruptedException
public Counter getCounter(java.lang.Enum<?> counterName)
TaskInputOutputContext
Counter
for the given counterName
.
getCounter
in interface TaskInputOutputContext<KEYIN,VALUEIN,KEYOUT,VALUEOUT>
counterName
- counter name
Counter
for the given counterName
public Counter getCounter(java.lang.String groupName, java.lang.String counterName)
TaskInputOutputContext
Counter
for the given groupName
and
counterName
.
getCounter
in interface TaskInputOutputContext<KEYIN,VALUEIN,KEYOUT,VALUEOUT>
counterName
- counter name
Counter
for the given groupName
and
counterName
public OutputCommitter getOutputCommitter()
TaskInputOutputContext
OutputCommitter
for the task-attempt.
getOutputCommitter
in interface TaskInputOutputContext<KEYIN,VALUEIN,KEYOUT,VALUEOUT>
OutputCommitter
for the task-attempt
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |