org.apache.hadoop.mapreduce.lib.output

## Class FilterOutputFormat.FilterRecordWriter<K,V>

- java.lang.Object
- - org.apache.hadoop.mapreduce.RecordWriter<K,V>
  - - org.apache.hadoop.mapreduce.lib.output.FilterOutputFormat.FilterRecordWriter<K,V>

- Enclosing class:
    FilterOutputFormat<K,V>

      public static class FilterOutputFormat.FilterRecordWriter<K,V>
      extends RecordWriter<K,V>

  `FilterRecordWriter` is a convenience wrapper class that extends the `RecordWriter`.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected RecordWriter<K,V>` | `rawWriter`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FilterRecordWriter()`
    `FilterRecordWriter(RecordWriter<K,V> rwriter)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close(TaskAttemptContext context)` Close this `RecordWriter` to future operations.
    `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`

- - ### Field Detail

    - #### rawWriter

          protected RecordWriter<K,V> rawWriter

  - ### Constructor Detail

    - #### FilterRecordWriter

          public FilterRecordWriter()

    - #### FilterRecordWriter

          public FilterRecordWriter(RecordWriter<K,V> rwriter)

  - ### Method Detail

    - #### write

          public void write(K key,
                            V value)
                     throws IOException,
                            InterruptedException

      Description copied from class: `RecordWriter`
      Writes a key/value pair.
      Specified by:
        `write` in class `RecordWriter<K,V>`
      Parameters:
        `key` - the key to write.
        `value` - the value to write.
      Throws:
        `IOException`
        `InterruptedException`

    - #### close

          public void close(TaskAttemptContext context)
                     throws IOException,
                            InterruptedException

      Description copied from class: `RecordWriter`
      Close this `RecordWriter` to future operations.
      Specified by:
        `close` in class `RecordWriter<K,V>`
      Parameters:
        `context` - the context of the task
      Throws:
        `IOException`
        `InterruptedException`

Copyright © 2008–2022 Apache Software Foundation. All rights reserved.