public class ResultPartitionWriter extends Object implements EventListener<TaskEvent>
The ResultPartitionWriter is the runtime API for producing results. It
supports two kinds of data to be sent: buffers and events.
| Constructor and Description |
|---|
ResultPartitionWriter(ResultPartition partition) |
| Modifier and Type | Method and Description |
|---|---|
BufferProvider |
getBufferProvider() |
int |
getNumberOfOutputChannels() |
int |
getNumTargetKeyGroups() |
ResultPartitionID |
getPartitionId() |
void |
onEvent(TaskEvent event) |
void |
subscribeToEvent(EventListener<TaskEvent> eventListener,
Class<? extends TaskEvent> eventType) |
void |
writeBuffer(Buffer buffer,
int targetChannel) |
void |
writeBufferToAllChannels(Buffer eventBuffer)
Writes the given buffer to all available target channels.
|
public ResultPartitionWriter(ResultPartition partition)
public ResultPartitionID getPartitionId()
public BufferProvider getBufferProvider()
public int getNumberOfOutputChannels()
public int getNumTargetKeyGroups()
public void writeBuffer(Buffer buffer, int targetChannel) throws IOException
IOExceptionpublic void writeBufferToAllChannels(Buffer eventBuffer) throws IOException
eventBuffer - the buffer to writeIOExceptionpublic void subscribeToEvent(EventListener<TaskEvent> eventListener, Class<? extends TaskEvent> eventType)
public void onEvent(TaskEvent event)
onEvent in interface EventListener<TaskEvent>Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.