@Internal public class SchemaOperator extends org.apache.flink.streaming.api.operators.AbstractStreamOperator<org.apache.flink.cdc.common.event.Event> implements org.apache.flink.streaming.api.operators.OneInputStreamOperator<org.apache.flink.cdc.common.event.Event,org.apache.flink.cdc.common.event.Event>, Serializable
SchemaCoordinator for incoming SchemaChangeEvents and block the stream for tables before their schema changes finish.| 构造器和说明 |
|---|
SchemaOperator(List<org.apache.flink.cdc.common.route.RouteRule> routingRules) |
SchemaOperator(List<org.apache.flink.cdc.common.route.RouteRule> routingRules,
java.time.Duration rpcTimeOut) |
SchemaOperator(List<org.apache.flink.cdc.common.route.RouteRule> routingRules,
java.time.Duration rpcTimeOut,
org.apache.flink.cdc.common.pipeline.SchemaChangeBehavior schemaChangeBehavior) |
SchemaOperator(List<org.apache.flink.cdc.common.route.RouteRule> routingRules,
java.time.Duration rpcTimeOut,
org.apache.flink.cdc.common.pipeline.SchemaChangeBehavior schemaChangeBehavior,
String timezone) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected int |
getCurrentTimestamp()
Visible for mocking in test cases.
|
void |
open() |
void |
processElement(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<org.apache.flink.cdc.common.event.Event> streamRecord)
This method is guaranteed to not be called concurrently with other methods of the operator.
|
void |
registerInitialSchema(org.apache.flink.cdc.common.event.TableId tableId,
org.apache.flink.cdc.common.schema.Schema schema) |
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.cdc.common.event.Event>> output) |
close, finish, getChainingStrategy, getContainingTask, getCurrentKey, getExecutionConfig, getInternalTimerService, getKeyedStateBackend, getKeyedStateStore, getMetricGroup, getOperatorConfig, getOperatorID, getOperatorName, getOperatorStateBackend, getOrCreateKeyedState, getPartitionedState, getPartitionedState, getProcessingTimeService, getRuntimeContext, getTimeServiceManager, getUserCodeClassloader, hasKeyContext1, hasKeyContext2, initializeState, initializeState, isUsingCustomRawKeyedState, notifyCheckpointAborted, notifyCheckpointComplete, prepareSnapshotPreBarrier, processLatencyMarker, processLatencyMarker1, processLatencyMarker2, processRecordAttributes, processRecordAttributes1, processRecordAttributes2, processWatermark, processWatermark1, processWatermark2, processWatermarkStatus, processWatermarkStatus1, processWatermarkStatus2, reportOrForwardLatencyMarker, setChainingStrategy, setCurrentKey, setKeyContextElement1, setKeyContextElement2, setProcessingTimeService, snapshotState, snapshotStateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, finish, getMetricGroup, getOperatorID, initializeState, prepareSnapshotPreBarrier, setKeyContextElement1, setKeyContextElement2, snapshotStatenotifyCheckpointAborted, notifyCheckpointComplete@VisibleForTesting public SchemaOperator(List<org.apache.flink.cdc.common.route.RouteRule> routingRules)
@VisibleForTesting public SchemaOperator(List<org.apache.flink.cdc.common.route.RouteRule> routingRules, java.time.Duration rpcTimeOut)
@VisibleForTesting public SchemaOperator(List<org.apache.flink.cdc.common.route.RouteRule> routingRules, java.time.Duration rpcTimeOut, org.apache.flink.cdc.common.pipeline.SchemaChangeBehavior schemaChangeBehavior)
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.cdc.common.event.Event>> output)
setup 在接口中 org.apache.flink.streaming.api.operators.SetupableStreamOperator<org.apache.flink.cdc.common.event.Event>setup 在类中 org.apache.flink.streaming.api.operators.AbstractStreamOperator<org.apache.flink.cdc.common.event.Event>public void open()
throws Exception
open 在接口中 org.apache.flink.streaming.api.operators.StreamOperator<org.apache.flink.cdc.common.event.Event>open 在类中 org.apache.flink.streaming.api.operators.AbstractStreamOperator<org.apache.flink.cdc.common.event.Event>Exceptionpublic void processElement(org.apache.flink.streaming.runtime.streamrecord.StreamRecord<org.apache.flink.cdc.common.event.Event> streamRecord)
throws Exception
processElement 在接口中 org.apache.flink.streaming.api.operators.Input<org.apache.flink.cdc.common.event.Event>Exception@VisibleForTesting protected int getCurrentTimestamp()
@VisibleForTesting
public void registerInitialSchema(org.apache.flink.cdc.common.event.TableId tableId,
org.apache.flink.cdc.common.schema.Schema schema)
Copyright © 2025 The Apache Software Foundation. All rights reserved.