org.apache.avro.mapred.tether

## Interface InputProtocol

- All Known Subinterfaces:
    InputProtocol.Callback

      public interface InputProtocol

  Transmit inputs to a map or reduce task sub-process.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static interface` | `InputProtocol.Callback` Transmit inputs to a map or reduce task sub-process.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static Protocol` | `PROTOCOL`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `abort()` Called to abort the task.
    `void` | `complete()` Called when a task's input is complete.
    `void` | `configure(TaskType taskType, String inSchema, String outSchema)` Configure the task.
    `void` | `input(ByteBuffer data, long count)` Send a block of input data to a task.
    `void` | `partitions(int partitions)` Set the number of map output partitions.

- - ### Field Detail

    - #### PROTOCOL

          static final Protocol PROTOCOL

  - ### Method Detail

    - #### configure

          void configure(TaskType taskType,
                         String inSchema,
                         String outSchema)

      Configure the task. Sent before any other message.
      Parameters:
        `taskType` - Whether this is a map or reduce task.
        `inSchema` - The Avro schema for task input data.
        `outSchema` - The Avro schema for task output data.

    - #### partitions

          void partitions(int partitions)

      Set the number of map output partitions.
      Parameters:
        `partitions` - The number of map output partitions.

    - #### input

          void input(ByteBuffer data,
                     long count)

      Send a block of input data to a task.
      Parameters:
        `data` - A sequence of instances of the declared schema.
        `count` - The number of instances in this block.

    - #### abort

          void abort()

      Called to abort the task.

    - #### complete

          void complete()

      Called when a task's input is complete.

Copyright © 2009–2024 The Apache Software Foundation. All rights reserved.