p2pMapReduce.mapreduceModule.output
Class RecordWriter<K,V>

java.lang.Object
  extended by p2pMapReduce.mapreduceModule.output.RecordWriter<K,V>
Direct Known Subclasses:
LineRecordWriter, MapRecordWriter

public abstract class RecordWriter<K,V>
extends java.lang.Object

RecordWriter writes the output <key, value> pairs to an output file.

RecordWriter implementations write the job outputs to the FileSystem.

See Also:
OutputFormat

Constructor Summary
RecordWriter()
           
 
Method Summary
abstract  void close(TaskAttemptContext context)
          Close this RecordWriter to future operations.
abstract  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
 

Constructor Detail

RecordWriter

public RecordWriter()
Method Detail

write

public abstract void write(K key,
                           V value)
                    throws java.io.IOException,
                           java.lang.InterruptedException
Writes a key/value pair.

Parameters:
key - the key to write.
value - the value to write.
Throws:
java.io.IOException
java.lang.InterruptedException

close

public abstract void close(TaskAttemptContext context)
                    throws java.io.IOException,
                           java.lang.InterruptedException
Close this RecordWriter to future operations.

Parameters:
context - the context of the task
Throws:
java.io.IOException
java.lang.InterruptedException