Class ChannelStateWriter.NoOpChannelStateWriter
java.lang.Object
org.apache.flink.runtime.checkpoint.channel.ChannelStateWriter.NoOpChannelStateWriter
- All Implemented Interfaces:
Closeable,AutoCloseable,ChannelStateWriter
- Enclosing interface:
- ChannelStateWriter
public static class ChannelStateWriter.NoOpChannelStateWriter
extends Object
implements ChannelStateWriter
No-op implementation of
ChannelStateWriter.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.flink.runtime.checkpoint.channel.ChannelStateWriter
ChannelStateWriter.ChannelStateWriteResult, ChannelStateWriter.NoOpChannelStateWriter -
Field Summary
Fields inherited from interface org.apache.flink.runtime.checkpoint.channel.ChannelStateWriter
NO_OP, SEQUENCE_NUMBER_RESTORED, SEQUENCE_NUMBER_UNKNOWN -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAborts the checkpoint and fails pending result for this checkpoint.voidaddInputData(long checkpointId, InputChannelInfo info, int startSeqNum, org.apache.flink.util.CloseableIterator<Buffer> data) Add in-flight buffers from theInputChannel.voidaddOutputData(long checkpointId, ResultSubpartitionInfo info, int startSeqNum, Buffer... data) Add in-flight buffers from theResultSubpartition.voidaddOutputDataFuture(long checkpointId, ResultSubpartitionInfo info, int startSeqNum, CompletableFuture<List<Buffer>> data) Add in-flight bufferFuture from theResultSubpartition.voidclose()voidfinishInput(long checkpointId) Finalize write of channel state data for the given checkpoint id.voidfinishOutput(long checkpointId) Finalize write of channel state data for the given checkpoint id.getAndRemoveWriteResult(long checkpointId) Must be called afterChannelStateWriter.start(long, CheckpointOptions)once.voidstart(long checkpointId, CheckpointOptions checkpointOptions) Initiate write of channel state for the given checkpoint id.
-
Constructor Details
-
NoOpChannelStateWriter
public NoOpChannelStateWriter()
-
-
Method Details
-
start
Description copied from interface:ChannelStateWriterInitiate write of channel state for the given checkpoint id.- Specified by:
startin interfaceChannelStateWriter
-
addInputData
public void addInputData(long checkpointId, InputChannelInfo info, int startSeqNum, org.apache.flink.util.CloseableIterator<Buffer> data) Description copied from interface:ChannelStateWriterAdd in-flight buffers from theInputChannel. Must be called afterChannelStateWriter.start(long,CheckpointOptions)and beforeChannelStateWriter.finishInput(long). Buffers are recycled after they are written or exception occurs.- Specified by:
addInputDatain interfaceChannelStateWriterstartSeqNum- sequence number of the 1st passed buffer. It is intended to use for incremental snapshots. If no data is passed it is ignored.data- zero or more data buffers ordered by their sequence numbers- See Also:
-
addOutputData
public void addOutputData(long checkpointId, ResultSubpartitionInfo info, int startSeqNum, Buffer... data) Description copied from interface:ChannelStateWriterAdd in-flight buffers from theResultSubpartition. Must be called afterChannelStateWriter.start(long, org.apache.flink.runtime.checkpoint.CheckpointOptions)and beforeChannelStateWriter.finishOutput(long). Buffers are recycled after they are written or exception occurs.- Specified by:
addOutputDatain interfaceChannelStateWriterstartSeqNum- sequence number of the 1st passed buffer. It is intended to use for incremental snapshots. If no data is passed it is ignored.data- zero or more data buffers ordered by their sequence numbers- See Also:
-
addOutputDataFuture
public void addOutputDataFuture(long checkpointId, ResultSubpartitionInfo info, int startSeqNum, CompletableFuture<List<Buffer>> data) Description copied from interface:ChannelStateWriterAdd in-flight bufferFuture from theResultSubpartition. Must be called afterChannelStateWriter.start(long, org.apache.flink.runtime.checkpoint.CheckpointOptions)and beforeChannelStateWriter.finishOutput(long). Buffers are recycled after they are written or exception occurs.The method will be called when the unaligned checkpoint is enabled and received an aligned barrier.
- Specified by:
addOutputDataFuturein interfaceChannelStateWriter
-
finishInput
public void finishInput(long checkpointId) Description copied from interface:ChannelStateWriterFinalize write of channel state data for the given checkpoint id. Must be called afterChannelStateWriter.start(long, CheckpointOptions)and all of the input data of the given checkpoint added. When bothChannelStateWriter.finishInput(long)andChannelStateWriter.finishOutput(long)were called the results can be (eventually) obtained usingChannelStateWriter.getAndRemoveWriteResult(long)- Specified by:
finishInputin interfaceChannelStateWriter
-
finishOutput
public void finishOutput(long checkpointId) Description copied from interface:ChannelStateWriterFinalize write of channel state data for the given checkpoint id. Must be called afterChannelStateWriter.start(long, CheckpointOptions)and all of the output data of the given checkpoint added. When bothChannelStateWriter.finishInput(long)andChannelStateWriter.finishOutput(long)were called the results can be (eventually) obtained usingChannelStateWriter.getAndRemoveWriteResult(long)- Specified by:
finishOutputin interfaceChannelStateWriter
-
abort
Description copied from interface:ChannelStateWriterAborts the checkpoint and fails pending result for this checkpoint.- Specified by:
abortin interfaceChannelStateWritercleanup- true ifChannelStateWriter.getAndRemoveWriteResult(long)is not supposed to be called afterwards.
-
getAndRemoveWriteResult
Description copied from interface:ChannelStateWriterMust be called afterChannelStateWriter.start(long, CheckpointOptions)once.- Specified by:
getAndRemoveWriteResultin interfaceChannelStateWriter
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-