@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
.
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 RecordWriter()
public abstract void write(K key, V value) throws IOException, InterruptedException
key
- the key to write.value
- the value to write.IOException
InterruptedException
public abstract void close(TaskAttemptContext context) throws IOException, InterruptedException
RecordWriter
to future operations.context
- the context of the taskIOException
InterruptedException
Copyright © 2018 Apache Software Foundation. All rights reserved.