InputT
- The type of the sink's input@Public public interface Sink<InputT> extends Serializable
Sink
is a stateless sink that can flush
data on checkpoint to achieve at-least-once consistency. Sinks with additional requirements
should implement SupportsWriterState
or SupportsCommitter
.
The Sink
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 |
Sink.InitContext
Deprecated.
|
static class |
Sink.InitContextWrapper
Deprecated.
Internal, do not use it.
|
Modifier and Type | Method and Description |
---|---|
SinkWriter<InputT> |
createWriter(Sink.InitContext context)
Deprecated.
Please implement
createWriter(WriterInitContext) . For backward
compatibility reasons - to keep Sink a functional interface - Flink did not
provide a default implementation. New Sink implementations should implement this
method, but it will not be used, and it will be removed in 1.20.0 release. Do not use
Override annotation when implementing this method, to prevent compilation errors
when migrating to 1.20.x release. |
default SinkWriter<InputT> |
createWriter(WriterInitContext context)
Creates a
SinkWriter . |
@Deprecated SinkWriter<InputT> createWriter(Sink.InitContext context) throws IOException
createWriter(WriterInitContext)
. For backward
compatibility reasons - to keep Sink
a functional interface - Flink did not
provide a default implementation. New Sink
implementations should implement this
method, but it will not be used, and it will be removed in 1.20.0 release. Do not use
Override
annotation when implementing this method, to prevent compilation errors
when migrating to 1.20.x release.SinkWriter
.context
- the runtime context.IOException
- for any failure during creation.default SinkWriter<InputT> createWriter(WriterInitContext context) throws IOException
SinkWriter
.context
- the runtime context.IOException
- for any failure during creation.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.