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>

public class ChalkSink<IN> extends Object implements 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:
  • Constructor Details

  • Method Details

    • createWriter

      public org.apache.flink.api.connector.sink2.SinkWriter<IN> createWriter(org.apache.flink.api.connector.sink2.Sink.InitContext context)
      Specified by:
      createWriter in interface org.apache.flink.api.connector.sink2.Sink<IN>