Interface TwoPhaseCommittingSink<InputT,CommT>
-
- Type Parameters:
InputT- The type of the sink's inputCommT- The type of the committables.
- All Superinterfaces:
Serializable,Sink<InputT>,SupportsCommitter<CommT>
@PublicEvolving @Deprecated public interface TwoPhaseCommittingSink<InputT,CommT> extends Sink<InputT>, SupportsCommitter<CommT>
Deprecated.Please implementSinkSupportsCommitterinstead.ASinkfor exactly-once semantics using a two-phase commit protocol. TheSinkconsists of aSinkWriterthat performs the precommits and aCommitterthat actually commits the data. To facilitate the separation theSinkWritercreates committables on checkpoint or end of input and the sends it to theCommitter.The
TwoPhaseCommittingSinkneeds to be serializable. All configuration should be validated eagerly. The respective sink writers and committers are transient and will only be created in the subtasks on the taskmanagers.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceTwoPhaseCommittingSink.PrecommittingSinkWriter<InputT,CommT>Deprecated.-
Nested classes/interfaces inherited from interface org.apache.flink.api.connector.sink2.Sink
Sink.InitContext, Sink.InitContextWrapper
-
-
Method Summary
All Methods Instance Methods Default Methods Deprecated Methods Modifier and Type Method Description default Committer<CommT>createCommitter()Deprecated.Please usecreateCommitter(CommitterInitContext)default Committer<CommT>createCommitter(CommitterInitContext context)Deprecated.Creates aCommitterthat permanently makes the previously written data visible throughCommitter.commit(Collection).-
Methods inherited from interface org.apache.flink.api.connector.sink2.Sink
createWriter, createWriter
-
Methods inherited from interface org.apache.flink.api.connector.sink2.SupportsCommitter
getCommittableSerializer
-
-
-
-
Method Detail
-
createCommitter
@Deprecated default Committer<CommT> createCommitter() throws IOException
Deprecated.Please usecreateCommitter(CommitterInitContext)Creates aCommitterthat permanently makes the previously written data visible throughCommitter.commit(Collection).- Returns:
- A committer for the two-phase commit protocol.
- Throws:
IOException- for any failure during creation.
-
createCommitter
default Committer<CommT> createCommitter(CommitterInitContext context) throws IOException
Deprecated.Creates aCommitterthat permanently makes the previously written data visible throughCommitter.commit(Collection).- Specified by:
createCommitterin interfaceSupportsCommitter<InputT>- Parameters:
context- The context information for the committer initialization.- Returns:
- A committer for the two-phase commit protocol.
- Throws:
IOException- for any failure during creation.
-
-