RecordWriter (Apache Hadoop Main 3.5.0 API)
Description: declaration: package: org.apache.hadoop.mapred, interface: RecordWriter

Package org.apache.hadoop.mapred

# Interface RecordWriter<K,V>

@Public @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

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

- ## Method Details

  - ### 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`