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
Modifier and TypeInterfaceDescriptionstatic interface
Transmit inputs to a map or reduce task sub-process. -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
abort()
Called to abort the task.void
complete()
Called when a task's input is complete.void
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
-
-
Method Details
-
configure
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
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.
-