public interface NetworkSequenceViewReader
Modifier and Type | Method and Description |
---|---|
void |
acknowledgeAllRecordsProcessed()
Acknowledges all the user records are processed.
|
void |
addCredit(int creditDeltas)
The credits from consumer are added in incremental way.
|
ResultSubpartitionView.AvailabilityWithBacklog |
getAvailabilityAndBacklog()
Checks whether this reader is available or not and returns the backlog at the same time.
|
Throwable |
getFailureCause() |
InputChannel.BufferAndAvailability |
getNextBuffer() |
InputChannelID |
getReceiverId() |
boolean |
isRegisteredAsAvailable() |
boolean |
isReleased() |
boolean |
needAnnounceBacklog()
Returns true if the producer backlog need to be announced to the consumer.
|
void |
notifyNewBufferSize(int newBufferSize) |
void |
notifyPartitionRequestTimeout(PartitionRequestListener partitionRequestListener)
When the partition request from the given downstream task is timeout, it should notify the
reader in netty server and send
PartitionNotFoundException to the task. |
void |
notifyRequiredSegmentId(int subpartitionId,
int segmentId)
Notify the id of required segment from consumer.
|
void |
notifySubpartitionsCreated(ResultPartition partition,
ResultSubpartitionIndexSet subpartitionIndexSet)
When the
ResultPartitionManager registers ResultPartition , it will get the
PartitionRequestListener via given ResultPartitionID , and create subpartition
view reader for downstream task. |
int |
peekNextBufferSubpartitionId() |
void |
releaseAllResources() |
void |
requestSubpartitionViewOrRegisterListener(ResultPartitionProvider partitionProvider,
ResultPartitionID resultPartitionId,
ResultSubpartitionIndexSet subpartitionIndexSet)
When the netty server receives the downstream task's partition request and the upstream task
has registered its partition, it will process the partition request immediately, otherwise it
will create a
PartitionRequestListener for given ResultPartitionID in ResultPartitionManager and notify the listener when the upstream task registers its
partition. |
void |
resumeConsumption()
Resumes data consumption after an exactly once checkpoint.
|
void |
setRegisteredAsAvailable(boolean isRegisteredAvailable)
Updates the value to indicate whether the reader is enqueued in the pipeline or not.
|
void requestSubpartitionViewOrRegisterListener(ResultPartitionProvider partitionProvider, ResultPartitionID resultPartitionId, ResultSubpartitionIndexSet subpartitionIndexSet) throws IOException
PartitionRequestListener
for given ResultPartitionID
in ResultPartitionManager
and notify the listener when the upstream task registers its
partition.partitionProvider
- the result partition providerresultPartitionId
- the result partition idsubpartitionIndexSet
- the sub partition indexesIOException
- the thrown exceptionvoid notifySubpartitionsCreated(ResultPartition partition, ResultSubpartitionIndexSet subpartitionIndexSet) throws IOException
ResultPartitionManager
registers ResultPartition
, it will get the
PartitionRequestListener
via given ResultPartitionID
, and create subpartition
view reader for downstream task.partition
- the result partitionsubpartitionIndexSet
- the sub partition indexesIOException
- the thrown exceptionint peekNextBufferSubpartitionId() throws IOException
IOException
@Nullable InputChannel.BufferAndAvailability getNextBuffer() throws IOException
IOException
boolean needAnnounceBacklog()
void addCredit(int creditDeltas)
creditDeltas
- The credit deltasvoid notifyRequiredSegmentId(int subpartitionId, int segmentId)
subpartitionId
- The id of the corresponding subpartition.segmentId
- The id of required segment.void resumeConsumption()
void acknowledgeAllRecordsProcessed()
ResultSubpartitionView.AvailabilityWithBacklog getAvailabilityAndBacklog()
boolean isRegisteredAsAvailable()
void setRegisteredAsAvailable(boolean isRegisteredAvailable)
isRegisteredAvailable
- True if this reader is already enqueued in the pipeline.boolean isReleased()
void releaseAllResources() throws IOException
IOException
Throwable getFailureCause()
InputChannelID getReceiverId()
void notifyNewBufferSize(int newBufferSize)
void notifyPartitionRequestTimeout(PartitionRequestListener partitionRequestListener)
PartitionNotFoundException
to the task.partitionRequestListener
- the timeout message of given PartitionRequestListener
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.