Class NoOpResultSubpartitionView
java.lang.Object
org.apache.flink.runtime.io.network.partition.NoOpResultSubpartitionView
- All Implemented Interfaces:
ResultSubpartitionView
A dummy implementation of the
ResultSubpartitionView.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.flink.runtime.io.network.partition.ResultSubpartitionView
ResultSubpartitionView.AvailabilityWithBacklog -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidgetAvailabilityAndBacklog(boolean isCreditAvailable) Get the availability and backlog of the view.ResultSubpartitionViewcan decide whether the failure cause should be reported to consumer as failure (primary failure) orProducerFailedException(secondary failure).Returns the nextBufferinstance of this queue iterator.intbooleanvoidvoidnotifyNewBufferSize(int newBufferSize) intReturns the index of the subpartition where the next buffer locates, or -1 if there is no buffer available and the subpartition to be consumed is not determined.voidvoidintMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.flink.runtime.io.network.partition.ResultSubpartitionView
notifyPriorityEvent, notifyRequiredSegmentId
-
Constructor Details
-
NoOpResultSubpartitionView
public NoOpResultSubpartitionView()
-
-
Method Details
-
getNextBuffer
Description copied from interface:ResultSubpartitionViewReturns the nextBufferinstance 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.- Specified by:
getNextBufferin interfaceResultSubpartitionView
-
notifyDataAvailable
public void notifyDataAvailable()- Specified by:
notifyDataAvailablein interfaceResultSubpartitionView
-
releaseAllResources
public void releaseAllResources()- Specified by:
releaseAllResourcesin interfaceResultSubpartitionView
-
isReleased
public boolean isReleased()- Specified by:
isReleasedin interfaceResultSubpartitionView
-
resumeConsumption
public void resumeConsumption()- Specified by:
resumeConsumptionin interfaceResultSubpartitionView
-
acknowledgeAllDataProcessed
public void acknowledgeAllDataProcessed()- Specified by:
acknowledgeAllDataProcessedin interfaceResultSubpartitionView
-
getFailureCause
Description copied from interface:ResultSubpartitionViewResultSubpartitionViewcan decide whether the failure cause should be reported to consumer as failure (primary failure) orProducerFailedException(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.
- Specified by:
getFailureCausein interfaceResultSubpartitionView
-
getAvailabilityAndBacklog
public ResultSubpartitionView.AvailabilityWithBacklog getAvailabilityAndBacklog(boolean isCreditAvailable) Description copied from interface:ResultSubpartitionViewGet the availability and backlog of the view. The availability represents if the view is ready to get buffer from it. The backlog represents the number of available data buffers.- Specified by:
getAvailabilityAndBacklogin interfaceResultSubpartitionView- Parameters:
isCreditAvailable- the availability of credits for thisResultSubpartitionView.- Returns:
- availability and backlog.
-
unsynchronizedGetNumberOfQueuedBuffers
public int unsynchronizedGetNumberOfQueuedBuffers()- Specified by:
unsynchronizedGetNumberOfQueuedBuffersin interfaceResultSubpartitionView
-
getNumberOfQueuedBuffers
public int getNumberOfQueuedBuffers()- Specified by:
getNumberOfQueuedBuffersin interfaceResultSubpartitionView
-
notifyNewBufferSize
public void notifyNewBufferSize(int newBufferSize) - Specified by:
notifyNewBufferSizein interfaceResultSubpartitionView
-
peekNextBufferSubpartitionId
public int peekNextBufferSubpartitionId()Description copied from interface:ResultSubpartitionViewReturns the index of the subpartition where the next buffer locates, or -1 if there is no buffer available and the subpartition to be consumed is not determined.- Specified by:
peekNextBufferSubpartitionIdin interfaceResultSubpartitionView
-