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 ofChannelStateWriter.
-
-
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 Constructor Description NoOpChannelStateWriter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidabort(long checkpointId, Throwable cause, boolean cleanup)Aborts 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.ChannelStateWriter.ChannelStateWriteResultgetAndRemoveWriteResult(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.
-
-
-
Method Detail
-
start
public void start(long checkpointId, CheckpointOptions checkpointOptions)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:
ChannelStateWriter.SEQUENCE_NUMBER_RESTORED,ChannelStateWriter.SEQUENCE_NUMBER_UNKNOWN
-
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:
ChannelStateWriter.SEQUENCE_NUMBER_RESTORED,ChannelStateWriter.SEQUENCE_NUMBER_UNKNOWN
-
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
public void abort(long checkpointId, Throwable cause, boolean cleanup)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
public ChannelStateWriter.ChannelStateWriteResult getAndRemoveWriteResult(long checkpointId)
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
-
-