public class SchemaCoordinator extends SchemaRegistry
SchemaOperator. Registry actor in distributed topology.org.apache.flink.runtime.operators.coordination.OperatorCoordinator.Context, org.apache.flink.runtime.operators.coordination.OperatorCoordinator.Provider, org.apache.flink.runtime.operators.coordination.OperatorCoordinator.SubtaskGateway| 限定符和类型 | 字段和说明 |
|---|---|
protected Set<Integer> |
flushedSinkWriters
Tracing sink writers that have flushed successfully.
|
activeSinkWriters, behavior, context, coordinatorExecutor, currentParallelism, failedReasons, metadataApplier, operatorName, router, routingRules, rpcTimeout, schemaManager| 构造器和说明 |
|---|
SchemaCoordinator(String operatorName,
org.apache.flink.runtime.operators.coordination.OperatorCoordinator.Context context,
ExecutorService coordinatorExecutor,
org.apache.flink.cdc.common.sink.MetadataApplier metadataApplier,
List<org.apache.flink.cdc.common.route.RouteRule> routingRules,
org.apache.flink.cdc.common.pipeline.SchemaChangeBehavior schemaChangeBehavior,
java.time.Duration rpcTimeout) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
emplaceOriginalSchema(org.apache.flink.cdc.common.event.TableId tableId,
Integer subTaskId,
org.apache.flink.cdc.common.schema.Schema schema) |
protected void |
handleCustomCoordinationRequest(org.apache.flink.runtime.operators.coordination.CoordinationRequest request,
CompletableFuture<org.apache.flink.runtime.operators.coordination.CoordinationResponse> responseFuture)
Coordination handler for customized
CoordinationRequests. |
protected void |
handleFlushSuccessEvent(FlushSuccessEvent event)
Overridable handler for
FlushSuccessEvents. |
protected void |
handleGetOriginalSchemaRequest(GetOriginalSchemaRequest request,
CompletableFuture<org.apache.flink.runtime.operators.coordination.CoordinationResponse> responseFuture)
Overridable handler for
GetOriginalSchemaRequests. |
protected void |
handleUnrecoverableError(String taskDescription,
Throwable t)
Last chance to execute codes before job fails globally.
|
protected void |
restore(byte[] checkpointData)
Restore schema registry state from byte array.
|
protected void |
snapshot(CompletableFuture<byte[]> resultFuture)
Snapshot current schema registry state in byte array form.
|
void |
start() |
checkpointCoordinator, close, emplaceEvolvedSchema, emplaceOriginalSchema, executionAttemptFailed, executionAttemptReady, failJob, handleCoordinationRequest, handleEventFromOperator, handleGetEvolvedSchemaRequest, handleSinkWriterRegisterEvent, loopUntil, loopWhen, notifyCheckpointComplete, resetToCheckpoint, runInEventLoop, subtaskResetpublic SchemaCoordinator(String operatorName, org.apache.flink.runtime.operators.coordination.OperatorCoordinator.Context context, ExecutorService coordinatorExecutor, org.apache.flink.cdc.common.sink.MetadataApplier metadataApplier, List<org.apache.flink.cdc.common.route.RouteRule> routingRules, org.apache.flink.cdc.common.pipeline.SchemaChangeBehavior schemaChangeBehavior, java.time.Duration rpcTimeout)
public void start()
throws Exception
start 在接口中 org.apache.flink.runtime.operators.coordination.OperatorCoordinatorstart 在类中 SchemaRegistryExceptionprotected void snapshot(CompletableFuture<byte[]> resultFuture) throws Exception
SchemaRegistrysnapshot 在类中 SchemaRegistryExceptionprotected void restore(byte[] checkpointData)
throws Exception
SchemaRegistryrestore 在类中 SchemaRegistryExceptionprotected void handleGetOriginalSchemaRequest(GetOriginalSchemaRequest request, CompletableFuture<org.apache.flink.runtime.operators.coordination.CoordinationResponse> responseFuture)
SchemaRegistryGetOriginalSchemaRequests.protected void handleCustomCoordinationRequest(org.apache.flink.runtime.operators.coordination.CoordinationRequest request,
CompletableFuture<org.apache.flink.runtime.operators.coordination.CoordinationResponse> responseFuture)
throws Exception
SchemaRegistryCoordinationRequests.handleCustomCoordinationRequest 在类中 SchemaRegistryExceptionprotected void handleFlushSuccessEvent(FlushSuccessEvent event) throws Exception
SchemaRegistryFlushSuccessEvents.handleFlushSuccessEvent 在类中 SchemaRegistryExceptionprotected void handleUnrecoverableError(String taskDescription, Throwable t)
SchemaRegistry@VisibleForTesting
public void emplaceOriginalSchema(org.apache.flink.cdc.common.event.TableId tableId,
Integer subTaskId,
org.apache.flink.cdc.common.schema.Schema schema)
Copyright © 2025 The Apache Software Foundation. All rights reserved.