public class UnknownInputChannel extends InputChannel
RemoteInputChannel
or LocalInputChannel at runtime.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 |
|---|---|
Buffer |
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, notifyAvailableBuffer, setErrorpublic 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
InputChannelThe queue index to request depends on which sub task the channel belongs to and is specified by the consumer of this channel.
IOExceptionpublic Buffer getNextBuffer() throws IOException
InputChannelIOExceptionpublic void sendTaskEvent(TaskEvent event) throws IOException
InputChannelTaskEvent 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.
IOExceptionpublic 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 in
BufferReader.
public void notifySubpartitionConsumed()
public void releaseAllResources()
throws IOException
InputChannelIOExceptionpublic RemoteInputChannel toRemoteInputChannel(ConnectionID producerAddress)
public LocalInputChannel toLocalInputChannel()
Copyright © 2014–2016 The Apache Software Foundation. All rights reserved.