Interface StatefulSink<InputT,WriterStateT>
-
- Type Parameters:
InputT- The type of the sink's inputWriterStateT- The type of the sink writer's state
- All Superinterfaces:
Serializable,Sink<InputT>,SupportsWriterState<InputT,WriterStateT>
@PublicEvolving @Deprecated public interface StatefulSink<InputT,WriterStateT> extends Sink<InputT>, SupportsWriterState<InputT,WriterStateT>
Deprecated.Please implementSinkandSupportsWriterStateinstead.ASinkwith a statefulSinkWriter.The
StatefulSinkneeds to be serializable. All configuration should be validated eagerly. The respective sink writers are transient and will only be created in the subtasks on the taskmanagers.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceStatefulSink.StatefulSinkWriter<InputT,WriterStateT>Deprecated.ASinkWriterwhose state needs to be checkpointed.static interfaceStatefulSink.WithCompatibleStateDeprecated.A mix-in forStatefulSinkthat allows users to migrate from a sink with a compatible state to this sink.-
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 StatefulSink.StatefulSinkWriter<InputT,WriterStateT>restoreWriter(Sink.InitContext context, Collection<WriterStateT> recoveredState)Deprecated.Create aStatefulSinkWriterfrom a recovered state.default StatefulSink.StatefulSinkWriter<InputT,WriterStateT>restoreWriter(WriterInitContext context, Collection<WriterStateT> recoveredState)Deprecated.Create aStatefulSinkWriterfrom a recovered state.-
Methods inherited from interface org.apache.flink.api.connector.sink2.Sink
createWriter, createWriter
-
Methods inherited from interface org.apache.flink.api.connector.sink2.SupportsWriterState
getWriterStateSerializer
-
-
-
-
Method Detail
-
restoreWriter
default StatefulSink.StatefulSinkWriter<InputT,WriterStateT> restoreWriter(Sink.InitContext context, Collection<WriterStateT> recoveredState) throws IOException
Deprecated.Create aStatefulSinkWriterfrom a recovered state.- Parameters:
context- the runtime context.- Returns:
- A sink writer.
- Throws:
IOException- for any failure during creation.
-
restoreWriter
default StatefulSink.StatefulSinkWriter<InputT,WriterStateT> restoreWriter(WriterInitContext context, Collection<WriterStateT> recoveredState) throws IOException
Deprecated.Create aStatefulSinkWriterfrom a recovered state.- Specified by:
restoreWriterin interfaceSupportsWriterState<InputT,WriterStateT>- Parameters:
context- the runtime context.recoveredState- the state to recover from.- Returns:
- A sink writer.
- Throws:
IOException- for any failure during creation.
-
-