Interface CommittingSinkWriter<InputT,CommittableT>
-
- All Superinterfaces:
AutoCloseable,SinkWriter<InputT>
- All Known Subinterfaces:
TwoPhaseCommittingSink.PrecommittingSinkWriter<InputT,CommT>
@PublicEvolving public interface CommittingSinkWriter<InputT,CommittableT> extends SinkWriter<InputT>
ASinkWriterthat performs the first part of a two-phase commit protocol.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.flink.api.connector.sink2.SinkWriter
SinkWriter.Context
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Collection<CommittableT>prepareCommit()Prepares for a commit.-
Methods inherited from interface java.lang.AutoCloseable
close
-
Methods inherited from interface org.apache.flink.api.connector.sink2.SinkWriter
flush, write, writeWatermark
-
-
-
-
Method Detail
-
prepareCommit
Collection<CommittableT> prepareCommit() throws IOException, InterruptedException
Prepares for a commit.This method will be called after
SinkWriter.flush(boolean)and beforeStatefulSinkWriter.snapshotState(long).- Returns:
- The data to commit as the second step of the two-phase commit protocol.
- Throws:
IOException- if fail to prepare for a commit.InterruptedException
-
-