CommT - the type of the committable (to send to downstream operators)@Internal
public class DataSinkWriterOperator<CommT>
extends org.apache.flink.streaming.api.operators.AbstractStreamOperator<org.apache.flink.streaming.api.connector.sink2.CommittableMessage<CommT>>
implements org.apache.flink.streaming.api.operators.OneInputStreamOperator<org.apache.flink.cdc.common.event.Event,org.apache.flink.streaming.api.connector.sink2.CommittableMessage<CommT>>, org.apache.flink.streaming.api.operators.BoundedOneInput
Sink.
The operator is a proxy of SinkWriterOperator in Flink.
The operator is always part of a sink pipeline and is the first operator.
| Constructor and Description |
|---|
DataSinkWriterOperator(org.apache.flink.api.connector.sink2.Sink<org.apache.flink.cdc.common.event.Event> sink,
org.apache.flink.streaming.runtime.tasks.ProcessingTimeService processingTimeService,
org.apache.flink.api.common.operators.MailboxExecutor mailboxExecutor,
org.apache.flink.runtime.jobgraph.OperatorID schemaOperatorID) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
endInput() |
void |
initializeState(org.apache.flink.runtime.state.StateInitializationContext context) |
void |
open() |
void |
prepareSnapshotPreBarrier(long checkpointId) |
void |
processElement(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<org.apache.flink.cdc.common.event.Event> element) |
void |
processWatermark(org.apache.flink.streaming.api.watermark.Watermark mark) |
void |
processWatermarkStatus(org.apache.flink.streaming.runtime.watermarkstatus.WatermarkStatus watermarkStatus) |
void |
setup(org.apache.flink.streaming.runtime.tasks.StreamTask<?,?> containingTask,
org.apache.flink.streaming.api.graph.StreamConfig config,
org.apache.flink.streaming.api.operators.Output<org.apache.flink.streaming.runtime.streamrecord.StreamRecord<org.apache.flink.streaming.api.connector.sink2.CommittableMessage<CommT>>> output) |
void |
snapshotState(org.apache.flink.runtime.state.StateSnapshotContext context) |
finish, getChainingStrategy, getContainingTask, getCurrentKey, getExecutionConfig, getInternalTimerService, getKeyedStateBackend, getKeyedStateStore, getMetricGroup, getOperatorConfig, getOperatorID, getOperatorName, getOperatorStateBackend, getOrCreateKeyedState, getPartitionedState, getPartitionedState, getProcessingTimeService, getRuntimeContext, getTimeServiceManager, getUserCodeClassloader, hasKeyContext1, hasKeyContext2, initializeState, isUsingCustomRawKeyedState, notifyCheckpointAborted, notifyCheckpointComplete, processLatencyMarker, processLatencyMarker1, processLatencyMarker2, processWatermark1, processWatermark2, processWatermarkStatus1, processWatermarkStatus2, reportOrForwardLatencyMarker, setChainingStrategy, setCurrentKey, setKeyContextElement1, setKeyContextElement2, setProcessingTimeService, snapshotStateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetKeyContextElementfinish, getMetricGroup, getOperatorID, initializeState, setKeyContextElement1, setKeyContextElement2, snapshotStatenotifyCheckpointAborted, notifyCheckpointCompletegetCurrentKey, setCurrentKeypublic DataSinkWriterOperator(org.apache.flink.api.connector.sink2.Sink<org.apache.flink.cdc.common.event.Event> sink,
org.apache.flink.streaming.runtime.tasks.ProcessingTimeService processingTimeService,
org.apache.flink.api.common.operators.MailboxExecutor mailboxExecutor,
org.apache.flink.runtime.jobgraph.OperatorID schemaOperatorID)
public void setup(org.apache.flink.streaming.runtime.tasks.StreamTask<?,?> containingTask,
org.apache.flink.streaming.api.graph.StreamConfig config,
org.apache.flink.streaming.api.operators.Output<org.apache.flink.streaming.runtime.streamrecord.StreamRecord<org.apache.flink.streaming.api.connector.sink2.CommittableMessage<CommT>>> output)
setup in interface org.apache.flink.streaming.api.operators.SetupableStreamOperator<org.apache.flink.streaming.api.connector.sink2.CommittableMessage<CommT>>setup in class org.apache.flink.streaming.api.operators.AbstractStreamOperator<org.apache.flink.streaming.api.connector.sink2.CommittableMessage<CommT>>public void open()
throws Exception
open in interface org.apache.flink.streaming.api.operators.StreamOperator<org.apache.flink.streaming.api.connector.sink2.CommittableMessage<CommT>>open in class org.apache.flink.streaming.api.operators.AbstractStreamOperator<org.apache.flink.streaming.api.connector.sink2.CommittableMessage<CommT>>Exceptionpublic void initializeState(org.apache.flink.runtime.state.StateInitializationContext context)
throws Exception
initializeState in interface org.apache.flink.streaming.api.operators.StreamOperatorStateHandler.CheckpointedStreamOperatorinitializeState in class org.apache.flink.streaming.api.operators.AbstractStreamOperator<org.apache.flink.streaming.api.connector.sink2.CommittableMessage<CommT>>Exceptionpublic void snapshotState(org.apache.flink.runtime.state.StateSnapshotContext context)
throws Exception
snapshotState in interface org.apache.flink.streaming.api.operators.StreamOperatorStateHandler.CheckpointedStreamOperatorsnapshotState in class org.apache.flink.streaming.api.operators.AbstractStreamOperator<org.apache.flink.streaming.api.connector.sink2.CommittableMessage<CommT>>Exceptionpublic void processWatermark(org.apache.flink.streaming.api.watermark.Watermark mark)
throws Exception
processWatermark in interface org.apache.flink.streaming.api.operators.Input<org.apache.flink.cdc.common.event.Event>processWatermark in class org.apache.flink.streaming.api.operators.AbstractStreamOperator<org.apache.flink.streaming.api.connector.sink2.CommittableMessage<CommT>>Exceptionpublic void processWatermarkStatus(org.apache.flink.streaming.runtime.watermarkstatus.WatermarkStatus watermarkStatus)
throws Exception
processWatermarkStatus in interface org.apache.flink.streaming.api.operators.Input<org.apache.flink.cdc.common.event.Event>processWatermarkStatus in class org.apache.flink.streaming.api.operators.AbstractStreamOperator<org.apache.flink.streaming.api.connector.sink2.CommittableMessage<CommT>>Exceptionpublic void processElement(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<org.apache.flink.cdc.common.event.Event> element)
throws Exception
processElement in interface org.apache.flink.streaming.api.operators.Input<org.apache.flink.cdc.common.event.Event>Exceptionpublic void prepareSnapshotPreBarrier(long checkpointId)
throws Exception
prepareSnapshotPreBarrier in interface org.apache.flink.streaming.api.operators.StreamOperator<org.apache.flink.streaming.api.connector.sink2.CommittableMessage<CommT>>prepareSnapshotPreBarrier in class org.apache.flink.streaming.api.operators.AbstractStreamOperator<org.apache.flink.streaming.api.connector.sink2.CommittableMessage<CommT>>Exceptionpublic void close()
throws Exception
close in interface org.apache.flink.streaming.api.operators.StreamOperator<org.apache.flink.streaming.api.connector.sink2.CommittableMessage<CommT>>close in class org.apache.flink.streaming.api.operators.AbstractStreamOperator<org.apache.flink.streaming.api.connector.sink2.CommittableMessage<CommT>>ExceptionCopyright © 2024 The Apache Software Foundation. All rights reserved.