Package ai.chalk.flink.sink
Class ChalkSink<IN>
java.lang.Object
ai.chalk.flink.sink.ChalkSink<IN>
- Type Parameters:
IN- the stream element type
- All Implemented Interfaces:
Serializable,org.apache.flink.api.connector.sink2.Sink<IN>
Chalk
upload_features sink on the modern Sink2 API (Flink 1.15+). Use it with
stream.sinkTo(new ChalkSink<>(config, converter)).
Compiled against the Flink 1.18 Sink.createWriter(InitContext) signature, which is
source-compatible across 1.15–1.19. On Flink 2.0 the parameter type is WriterInitContext;
adjust the one override below if targeting 2.0. The ChalkRichSinkFunction adapter remains
the choice for older (pre-1.15) clusters.
Sink is serialized and shipped to TaskManagers, so both ChalkSinkConfig and the
ChalkRowConverter must be serializable (they are).
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.flink.api.connector.sink2.Sink
org.apache.flink.api.connector.sink2.Sink.InitContext, org.apache.flink.api.connector.sink2.Sink.InitContextWrapper -
Constructor Summary
ConstructorsConstructorDescriptionChalkSink(ChalkSinkConfig config, ChalkRowConverter<IN> converter) ChalkSink(ChalkSinkConfig config, ChalkRowConverter<IN> converter, ChalkUploadClientFactory clientFactory) Advanced/test constructor: inject the upload-client factory (e.g. -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.flink.api.connector.sink2.SinkWriter<IN>createWriter(org.apache.flink.api.connector.sink2.Sink.InitContext context) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.flink.api.connector.sink2.Sink
createWriter
-
Constructor Details
-
ChalkSink
-
ChalkSink
public ChalkSink(ChalkSinkConfig config, ChalkRowConverter<IN> converter, ChalkUploadClientFactory clientFactory) Advanced/test constructor: inject the upload-client factory (e.g. a fake for MiniCluster).
-
-
Method Details