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 ClassesModifier and TypeInterfaceDescriptionstatic interfaceTransmit inputs to a map or reduce task sub-process. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidabort()Called to abort the task.voidcomplete()Called when a task's input is complete.voidConfigure the task.voidinput(ByteBuffer data, long count) Send a block of input data to a task.voidpartitions(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.
-