public class UnknownInputChannel extends InputChannel
RemoteInputChannel
or LocalInputChannel
at runtime.InputChannel.BufferAndAvailability
channelIndex, inputGate, numBytesIn, partitionId
Constructor and Description |
---|
UnknownInputChannel(SingleInputGate gate,
int channelIndex,
ResultPartitionID partitionId,
ResultPartitionManager partitionManager,
TaskEventDispatcher taskEventDispatcher,
ConnectionManager connectionManager,
scala.Tuple2<Integer,Integer> partitionRequestInitialAndMaxBackoff,
IOMetricGroup metrics) |
Modifier and Type | Method and Description |
---|---|
InputChannel.BufferAndAvailability |
getNextBuffer()
Returns the next buffer from the consumed subpartition.
|
boolean |
isReleased()
Returns
false . |
void |
notifySubpartitionConsumed() |
void |
releaseAllResources()
Releases all resources of the channel.
|
void |
requestSubpartition(int subpartitionIndex)
Requests the queue with the specified index of the source intermediate
result partition.
|
void |
sendTaskEvent(TaskEvent event)
Sends a
TaskEvent back to the task producing the consumed result partition. |
LocalInputChannel |
toLocalInputChannel() |
RemoteInputChannel |
toRemoteInputChannel(ConnectionID producerAddress) |
String |
toString() |
checkError, getCurrentBackoff, increaseBackoff, notifyChannelNonEmpty, setError
public UnknownInputChannel(SingleInputGate gate, int channelIndex, ResultPartitionID partitionId, ResultPartitionManager partitionManager, TaskEventDispatcher taskEventDispatcher, ConnectionManager connectionManager, scala.Tuple2<Integer,Integer> partitionRequestInitialAndMaxBackoff, IOMetricGroup metrics)
public void requestSubpartition(int subpartitionIndex) throws IOException
InputChannel
The queue index to request depends on which sub task the channel belongs to and is specified by the consumer of this channel.
IOException
public InputChannel.BufferAndAvailability getNextBuffer() throws IOException
InputChannel
IOException
public void sendTaskEvent(TaskEvent event) throws IOException
InputChannel
TaskEvent
back to the task producing the consumed result partition.
Important: The producing task has to be running to receive backwards events. This means that the result type needs to be pipelined and the task logic has to ensure that the producer will wait for all backwards events. Otherwise, this will lead to an Exception at runtime.
IOException
public boolean isReleased()
false
.
Important: It is important that the method correctly
always false
for unknown input channels in order to not
finish the consumption of an intermediate result partition early.
public void notifySubpartitionConsumed()
public void releaseAllResources() throws IOException
InputChannel
IOException
public RemoteInputChannel toRemoteInputChannel(ConnectionID producerAddress)
public LocalInputChannel toLocalInputChannel()
Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.