InputT- The type of the sink's input
CommT- The type of the committables.
@PublicEvolving public interface TwoPhaseCommittingSink<InputT,CommT> extends Sink<InputT>
Sinkfor exactly-once semantics using a two-phase commit protocol. The
Sinkconsists of a
SinkWriterthat performs the precommits and a
Committerthat actually commits the data. To facilitate the separation the
SinkWritercreates committables on checkpoint or end of input and the sends it to the
TwoPhaseCommittingSink needs 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.
|Modifier and Type||Interface and Description|
|Modifier and Type||Method and Description|
Returns the serializer of the committable type.
TwoPhaseCommittingSink.PrecommittingSinkWriter<InputT,CommT> createWriter(Sink.InitContext context) throws IOException
TwoPhaseCommittingSink.PrecommittingSinkWriterthat creates committables on checkpoint or end of input.
Committer<CommT> createCommitter() throws IOException
Committerthat permanently makes the previously written data visible through
IOException- for any failure during creation.
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.