org.apache.hadoop.mapreduce
Class RecordWriter<K,V>

java.lang.Object
  extended by org.apache.hadoop.mapreduce.RecordWriter<K,V>

@InterfaceAudience.Public
@InterfaceStability.Stable
public abstract class RecordWriter<K,V>
extends 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 IOException,
                           InterruptedException
Writes a key/value pair.

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

close

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

Parameters:
context - the context of the task
Throws:
IOException
InterruptedException


Copyright © 2012 Apache Software Foundation. All Rights Reserved.