use of org.apache.flink.api.connector.sink2.Sink.InitContext in project flink by apache.
the class SinkWriterOperator method initializeState.
@Override
public void initializeState(StateInitializationContext context) throws Exception {
super.initializeState(context);
OptionalLong checkpointId = context.getRestoredCheckpointId();
restoredCheckpointId = checkpointId;
InitContext initContext = createInitContext(checkpointId.isPresent() ? checkpointId.getAsLong() : null);
sinkWriter = writerStateHandler.createWriter(initContext, context);
}
Aggregations