Package 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
Description
`static interface`
`InputProtocol.Callback`
Transmit inputs to a map or reduce task sub-process.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final org.apache.avro.Protocol`
`PROTOCOL`

## Method Summary

Modifier and Type
Method
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 Details

### PROTOCOL

static final org.apache.avro.Protocol PROTOCOL

## Method Details

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