Interface Sink<InputT>
-
- Type Parameters:
InputT- The type of the sink's input
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
StatefulSink<InputT,WriterStateT>,TwoPhaseCommittingSink<InputT,CommT>
@Public public interface Sink<InputT> extends Serializable
Base interface for developing a sink. A basicSinkis a stateless sink that can flush data on checkpoint to achieve at-least-once consistency. Sinks with additional requirements should implementSupportsWriterStateorSupportsCommitter.The
Sinkneeds 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 interfaceSink.InitContextDeprecated.static classSink.InitContextWrapperDeprecated.Internal, do not use it.
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description SinkWriter<InputT>createWriter(Sink.InitContext context)Deprecated.Please implementcreateWriter(WriterInitContext).default SinkWriter<InputT>createWriter(WriterInitContext context)Creates aSinkWriter.
-
-
-
Method Detail
-
createWriter
@Deprecated SinkWriter<InputT> createWriter(Sink.InitContext context) throws IOException
Deprecated.Please implementcreateWriter(WriterInitContext). For backward compatibility reasons - to keepSinka functional interface - Flink did not provide a default implementation. NewSinkimplementations should implement this method, but it will not be used, and it will be removed in 1.20.0 release. Do not useOverrideannotation when implementing this method, to prevent compilation errors when migrating to 1.20.x release.Creates aSinkWriter.- Parameters:
context- the runtime context.- Returns:
- A sink writer.
- Throws:
IOException- for any failure during creation.
-
createWriter
default SinkWriter<InputT> createWriter(WriterInitContext context) throws IOException
Creates aSinkWriter.- Parameters:
context- the runtime context.- Returns:
- A sink writer.
- Throws:
IOException- for any failure during creation.
-
-