Class NonRecordWriter<T extends org.apache.flink.core.io.IOReadableWritable>
java.lang.Object
org.apache.flink.runtime.io.network.api.writer.NonRecordWriter<T>
- All Implemented Interfaces:
AutoCloseable,AvailabilityProvider,RecordWriterDelegate<T>
public class NonRecordWriter<T extends org.apache.flink.core.io.IOReadableWritable>
extends Object
implements RecordWriterDelegate<T>
The specific delegate implementation for the non output case like sink task.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.flink.runtime.io.AvailabilityProvider
AvailabilityProvider.AvailabilityHelper -
Field Summary
Fields inherited from interface org.apache.flink.runtime.io.AvailabilityProvider
AVAILABLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbroadcastEvent(AbstractEvent event) Broadcasts the provided event to all the internal record writer instances.voidclose()getRecordWriter(int outputIndex) Returns the internal actual record writer instance based on the output index.booleanIn order to best-effort avoid volatile access inCompletableFuture.isDone(), we check the condition offuture == AVAILABLEfirstly for getting probable performance benefits while hot looping.voidsetMaxOverdraftBuffersPerGate(int maxOverdraftBuffersPerGate) Sets the max overdraft buffer size of per gate.Methods 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.AvailabilityProvider
isApproximatelyAvailable
-
Constructor Details
-
NonRecordWriter
public NonRecordWriter()
-
-
Method Details
-
broadcastEvent
Description copied from interface:RecordWriterDelegateBroadcasts the provided event to all the internal record writer instances.- Specified by:
broadcastEventin interfaceRecordWriterDelegate<T extends org.apache.flink.core.io.IOReadableWritable>- Parameters:
event- the event to be emitted to all the output channels.- Throws:
IOException
-
getRecordWriter
Description copied from interface:RecordWriterDelegateReturns the internal actual record writer instance based on the output index.- Specified by:
getRecordWriterin interfaceRecordWriterDelegate<T extends org.apache.flink.core.io.IOReadableWritable>- Parameters:
outputIndex- the index respective to the record writer instance.
-
setMaxOverdraftBuffersPerGate
public void setMaxOverdraftBuffersPerGate(int maxOverdraftBuffersPerGate) Description copied from interface:RecordWriterDelegateSets the max overdraft buffer size of per gate.- Specified by:
setMaxOverdraftBuffersPerGatein interfaceRecordWriterDelegate<T extends org.apache.flink.core.io.IOReadableWritable>
-
getAvailableFuture
- Specified by:
getAvailableFuturein interfaceAvailabilityProvider- Returns:
- a future that is completed if the respective provider is available.
-
isAvailable
public boolean isAvailable()Description copied from interface:AvailabilityProviderIn order to best-effort avoid volatile access inCompletableFuture.isDone(), we check the condition offuture == AVAILABLEfirstly for getting probable performance benefits while hot looping.It is always safe to use this method in performance nonsensitive scenarios to get the precise state.
- Specified by:
isAvailablein interfaceAvailabilityProvider- Returns:
- true if this instance is available for further processing.
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-