org.apache.hadoop.mapred.nativetask.handlers

## Class NativeCollectorOnlyHandler<K,V>

- java.lang.Object
- - org.apache.hadoop.mapred.nativetask.handlers.NativeCollectorOnlyHandler<K,V>

- All Implemented Interfaces:
    Closeable, AutoCloseable, CommandDispatcher

      @InterfaceAudience.Private
      public class NativeCollectorOnlyHandler<K,V>
      extends Object
      implements CommandDispatcher, Closeable

  Java Record Reader + Java Mapper + Native Collector

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static Command` | `GET_COMBINE_HANDLER`
    `static Command` | `GET_OUTPUT_INDEX_PATH`
    `static Command` | `GET_OUTPUT_PATH`
    `static Command` | `GET_SPILL_PATH`
    `static String` | `NAME`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `NativeCollectorOnlyHandler(TaskContext context, INativeHandler nativeHandler, BufferPusher<K,V> kvPusher, ICombineHandler combiner)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `void` | `collect(K key, V value, int partition)`
    `static <K,V> NativeCollectorOnlyHandler<K,V>` | `create(TaskContext context)`
    `void` | `flush()`
    `ReadWriteBuffer` | `onCall(Command command, ReadWriteBuffer parameter)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### NAME

          public static final String NAME

      See Also:
        Constant Field Values

    - #### GET_OUTPUT_PATH

          public static final Command GET_OUTPUT_PATH

    - #### GET_OUTPUT_INDEX_PATH

          public static final Command GET_OUTPUT_INDEX_PATH

    - #### GET_SPILL_PATH

          public static final Command GET_SPILL_PATH

    - #### GET_COMBINE_HANDLER

          public static final Command GET_COMBINE_HANDLER

  - ### Constructor Detail

    - #### NativeCollectorOnlyHandler

          protected NativeCollectorOnlyHandler(TaskContext context,
                                               INativeHandler nativeHandler,
                                               BufferPusher<K,V> kvPusher,
                                               ICombineHandler combiner)
                                        throws IOException

      Throws:
        `IOException`

  - ### Method Detail

    - #### create

          public static <K,V> NativeCollectorOnlyHandler<K,V> create(TaskContext context)
                                                              throws IOException

      Throws:
        `IOException`

    - #### collect

          public void collect(K key,
                              V value,
                              int partition)
                       throws IOException

      Throws:
        `IOException`

    - #### flush

          public void flush()
                     throws IOException

      Throws:
        `IOException`

    - #### close

          public void close()
                     throws IOException

      Specified by:
        `close` in interface `Closeable`
      Specified by:
        `close` in interface `AutoCloseable`
      Throws:
        `IOException`

    - #### onCall

          public ReadWriteBuffer onCall(Command command,
                                        ReadWriteBuffer parameter)
                                 throws IOException

      Specified by:
        `onCall` in interface `CommandDispatcher`
      Throws:
        `IOException`

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