Interface OutputProtocol

All Known Subinterfaces:
OutputProtocol.Callback

public interface OutputProtocol
Transmit outputs from a map or reduce task to parent.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Transmit outputs from a map or reduce task to parent.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Protocol
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Called when a task's output has completed without error.
    void
    configure(int port)
    Configure task.
    void
    count(String group, String name, long amount)
    Increment a task/job counter.
    void
    fail(String message)
    Called by a failing task to abort.
    void
    Send an output datum.
    void
    outputPartitioned(int partition, ByteBuffer datum)
    Send map output datum explicitly naming its partition.
    void
    status(String message)
    Update the task's status message.
  • Field Details

    • PROTOCOL

      static final Protocol PROTOCOL
  • Method Details

    • configure

      void configure(int port)
      Configure task. Sent before any other message.
      Parameters:
      port - The port to transmit inputs to this task on.
    • output

      void output(ByteBuffer datum)
      Send an output datum.
      Parameters:
      datum - A binary-encoded instance of the declared schema.
    • outputPartitioned

      void outputPartitioned(int partition, ByteBuffer datum)
      Send map output datum explicitly naming its partition.
      Parameters:
      partition - The map output partition for this datum.
      datum - A binary-encoded instance of the declared schema.
    • status

      void status(String message)
      Update the task's status message. Also acts as keepalive.
      Parameters:
      message - The new status message for the task.
    • count

      void count(String group, String name, long amount)
      Increment a task/job counter.
      Parameters:
      group - The name of the counter group.
      name - The name of the counter to increment.
      amount - The amount to incrment the counter.
    • fail

      void fail(String message)
      Called by a failing task to abort.
      Parameters:
      message - The new status message for the task.
    • complete

      void complete()
      Called when a task's output has completed without error.