p2pMapReduce.mapreduceModule.output
Class MapRecordWriter<K,V>
java.lang.Object
p2pMapReduce.mapreduceModule.output.RecordWriter<K,V>
p2pMapReduce.mapreduceModule.output.MapRecordWriter<K,V>
public class MapRecordWriter<K,V>
- extends RecordWriter<K,V>
Writes map temp output
Method Summary |
void |
close(TaskAttemptContext context)
Close this RecordWriter to future operations. |
void |
write(K key,
V value)
Writes a key/value pair. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MapRecordWriter
public MapRecordWriter(TaskAttemptID taskAttID,
JobContext jobContext,
java.lang.Class<K> keyClass,
java.lang.Class<V> valueClass)
throws java.lang.ClassNotFoundException,
java.io.IOException
- Throws:
java.lang.ClassNotFoundException
java.io.IOException
write
public void write(K key,
V value)
throws java.io.IOException,
java.lang.InterruptedException
- Description copied from class:
RecordWriter
- Writes a key/value pair.
- Specified by:
write
in class RecordWriter<K,V>
- Parameters:
key
- the key to write.value
- the value to write.
- Throws:
java.io.IOException
java.lang.InterruptedException
close
public void close(TaskAttemptContext context)
throws java.io.IOException,
java.lang.InterruptedException
- Description copied from class:
RecordWriter
- Close this
RecordWriter
to future operations.
- Specified by:
close
in class RecordWriter<K,V>
- Parameters:
context
- the context of the task
- Throws:
java.io.IOException
java.lang.InterruptedException