Interface TwoPhaseCommittingStatefulSink<InputT,WriterStateT,CommT>
-
- Type Parameters:
InputT- The type of the sink's inputWriterStateT- The type of the sink writer's stateCommT- The type of the committables.
- All Superinterfaces:
Serializable,org.apache.flink.api.connector.sink2.Sink<InputT>,org.apache.flink.api.connector.sink2.SupportsCommitter<CommT>,org.apache.flink.api.connector.sink2.SupportsWriterState<InputT,WriterStateT>
- All Known Implementing Classes:
KafkaSink
@Internal public interface TwoPhaseCommittingStatefulSink<InputT,WriterStateT,CommT> extends org.apache.flink.api.connector.sink2.SupportsCommitter<CommT>, org.apache.flink.api.connector.sink2.SupportsWriterState<InputT,WriterStateT>, org.apache.flink.api.connector.sink2.Sink<InputT>A combination ofSupportsCommitterandSupportsWriterState.The purpose of this interface is to be able to pass an interface rather than a
KafkaSinkimplementation into the reducing sink which simplifies unit testing.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceTwoPhaseCommittingStatefulSink.PrecommittingStatefulSinkWriter<InputT,WriterStateT,CommT>A combination ofStatefulSinkWriter.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TwoPhaseCommittingStatefulSink.PrecommittingStatefulSinkWriter<InputT,WriterStateT,CommT>createWriter(org.apache.flink.api.connector.sink2.WriterInitContext context)TwoPhaseCommittingStatefulSink.PrecommittingStatefulSinkWriter<InputT,WriterStateT,CommT>restoreWriter(org.apache.flink.api.connector.sink2.WriterInitContext context, Collection<WriterStateT> recoveredState)
-
-
-
Method Detail
-
createWriter
TwoPhaseCommittingStatefulSink.PrecommittingStatefulSinkWriter<InputT,WriterStateT,CommT> createWriter(org.apache.flink.api.connector.sink2.WriterInitContext context) throws IOException
- Specified by:
createWriterin interfaceorg.apache.flink.api.connector.sink2.Sink<InputT>- Throws:
IOException
-
restoreWriter
TwoPhaseCommittingStatefulSink.PrecommittingStatefulSinkWriter<InputT,WriterStateT,CommT> restoreWriter(org.apache.flink.api.connector.sink2.WriterInitContext context, Collection<WriterStateT> recoveredState) throws IOException
- Specified by:
restoreWriterin interfaceorg.apache.flink.api.connector.sink2.SupportsWriterState<InputT,WriterStateT>- Throws:
IOException
-
-