InputT
- The type of the sink's inputWriterStateT
- The type of the sink writer's stateSink
and SupportsWriterState
instead.@PublicEvolving @Deprecated public interface StatefulSink<InputT,WriterStateT> extends Sink<InputT>, SupportsWriterState<InputT,WriterStateT>
Sink
with a stateful SinkWriter
.
The StatefulSink
needs 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.
Modifier and Type | Interface and Description |
---|---|
static interface |
StatefulSink.StatefulSinkWriter<InputT,WriterStateT>
Deprecated.
A
SinkWriter whose state needs to be checkpointed. |
static interface |
StatefulSink.WithCompatibleState
Deprecated.
A mix-in for
StatefulSink that allows users to migrate from a sink with a compatible
state to this sink. |
Sink.InitContext, Sink.InitContextWrapper
Modifier and Type | Method and Description |
---|---|
default StatefulSink.StatefulSinkWriter<InputT,WriterStateT> |
restoreWriter(Sink.InitContext context,
Collection<WriterStateT> recoveredState)
Deprecated.
Create a
StatefulSinkWriter from a recovered
state. |
default StatefulSink.StatefulSinkWriter<InputT,WriterStateT> |
restoreWriter(WriterInitContext context,
Collection<WriterStateT> recoveredState)
Deprecated.
Create a
StatefulSinkWriter from a recovered
state. |
createWriter, createWriter
getWriterStateSerializer
default StatefulSink.StatefulSinkWriter<InputT,WriterStateT> restoreWriter(Sink.InitContext context, Collection<WriterStateT> recoveredState) throws IOException
StatefulSinkWriter
from a recovered
state.context
- the runtime context.IOException
- for any failure during creation.default StatefulSink.StatefulSinkWriter<InputT,WriterStateT> restoreWriter(WriterInitContext context, Collection<WriterStateT> recoveredState) throws IOException
StatefulSinkWriter
from a recovered
state.restoreWriter
in interface SupportsWriterState<InputT,WriterStateT>
context
- the runtime context.recoveredState
- the state to recover from.IOException
- for any failure during creation.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.