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.
OutputFormat| Constructor and Description |
|---|
RecordWriter() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
close(TaskAttemptContext context)
Close this
RecordWriter to future operations. |
abstract void |
write(K key,
V value)
Writes a key/value pair.
|
public abstract void write(K key, V value) throws java.io.IOException, java.lang.InterruptedException
key - the key to write.value - the value to write.java.io.IOExceptionjava.lang.InterruptedExceptionpublic abstract void close(TaskAttemptContext context) throws java.io.IOException, java.lang.InterruptedException
RecordWriter to future operations.context - the context of the taskjava.io.IOExceptionjava.lang.InterruptedExceptionCopyright © 2009 The Apache Software Foundation