org.apache.hadoop.mapred
Interface RecordWriter<K,V>


@InterfaceAudience.Public
@InterfaceStability.Stable
public interface RecordWriter<K,V>

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

RecordWriter implementations write the job outputs to the FileSystem.

See Also:
OutputFormat

Method Summary
 void close(Reporter reporter)
          Close this RecordWriter to future operations.
 void write(K key, V value)
          Writes a key/value pair.
 

Method Detail

write

void write(K key,
           V value)
           throws IOException
Writes a key/value pair.

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

close

void close(Reporter reporter)
           throws IOException
Close this RecordWriter to future operations.

Parameters:
reporter - facility to report progress.
Throws:
IOException


Copyright © 2014 Apache Software Foundation. All Rights Reserved.