public interface ResultSubpartitionView
ResultSubpartition instance.| Modifier and Type | Interface and Description |
|---|---|
static class |
ResultSubpartitionView.AvailabilityWithBacklog
Availability of the
ResultSubpartitionView and the backlog in the corresponding
ResultSubpartition. |
| Modifier and Type | Method and Description |
|---|---|
void |
acknowledgeAllDataProcessed() |
ResultSubpartitionView.AvailabilityWithBacklog |
getAvailabilityAndBacklog(int numCreditsAvailable) |
Throwable |
getFailureCause()
ResultSubpartitionView can decide whether the failure cause should be reported to
consumer as failure (primary failure) or ProducerFailedException (secondary failure). |
ResultSubpartition.BufferAndBacklog |
getNextBuffer()
Returns the next
Buffer instance of this queue iterator. |
int |
getNumberOfQueuedBuffers() |
boolean |
isReleased() |
void |
notifyDataAvailable() |
void |
notifyNewBufferSize(int newBufferSize) |
default void |
notifyPriorityEvent(int priorityBufferNumber) |
void |
releaseAllResources() |
void |
resumeConsumption() |
int |
unsynchronizedGetNumberOfQueuedBuffers() |
@Nullable ResultSubpartition.BufferAndBacklog getNextBuffer() throws IOException
Buffer instance of this queue iterator.
If there is currently no instance available, it will return null. This might
happen for example when a pipelined queue producer is slower than the consumer or a spilled
queue needs to read in more data.
Important: The consumer has to make sure that each buffer instance will
eventually be recycled with Buffer.recycleBuffer() after it has been consumed.
IOExceptionvoid notifyDataAvailable()
default void notifyPriorityEvent(int priorityBufferNumber)
void releaseAllResources()
throws IOException
IOExceptionboolean isReleased()
void resumeConsumption()
void acknowledgeAllDataProcessed()
Throwable getFailureCause()
ResultSubpartitionView can decide whether the failure cause should be reported to
consumer as failure (primary failure) or ProducerFailedException (secondary failure).
Secondary failure can be reported only if producer (upstream task) is guaranteed to failover.
BEWARE: Incorrectly reporting failure cause as primary failure, can hide the root cause of the failure from the user.
ResultSubpartitionView.AvailabilityWithBacklog getAvailabilityAndBacklog(int numCreditsAvailable)
int unsynchronizedGetNumberOfQueuedBuffers()
int getNumberOfQueuedBuffers()
void notifyNewBufferSize(int newBufferSize)
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.