public class SchemaRegistry extends Object implements org.apache.flink.runtime.operators.coordination.OperatorCoordinator, org.apache.flink.runtime.operators.coordination.CoordinationRequestHandler
OperatorCoordinator for the SchemaOperator.
The SchemaRegister provides an event loop style thread model to interact with the
Flink runtime. The coordinator ensures that all the state manipulations are made by its event
loop thread.
This SchemaRegister is responsible for:
SchemaChangeRequest from SchemaOperator
SchemaOperator to continue to push data for the table after receiving FlushSuccessEvent from its registered sink writer
org.apache.flink.runtime.operators.coordination.OperatorCoordinator.Context, org.apache.flink.runtime.operators.coordination.OperatorCoordinator.Provider, org.apache.flink.runtime.operators.coordination.OperatorCoordinator.SubtaskGateway| 构造器和说明 |
|---|
SchemaRegistry(String operatorName,
org.apache.flink.runtime.operators.coordination.OperatorCoordinator.Context context,
ExecutorService executorService,
org.apache.flink.cdc.common.sink.MetadataApplier metadataApplier,
List<org.apache.flink.cdc.common.route.RouteRule> routes) |
SchemaRegistry(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> routes,
org.apache.flink.cdc.common.pipeline.SchemaChangeBehavior schemaChangeBehavior) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
checkpointCoordinator(long checkpointId,
CompletableFuture<byte[]> resultFuture) |
void |
close() |
void |
executionAttemptFailed(int subtask,
int attemptNumber,
Throwable throwable) |
void |
executionAttemptReady(int subtask,
int attemptNumber,
org.apache.flink.runtime.operators.coordination.OperatorCoordinator.SubtaskGateway subtaskGateway) |
void |
handleApplyEvolvedSchemaChangeRequest(org.apache.flink.cdc.common.event.SchemaChangeEvent schemaChangeEvent) |
void |
handleApplyOriginalSchemaChangeEvent(org.apache.flink.cdc.common.event.SchemaChangeEvent schemaChangeEvent) |
CompletableFuture<org.apache.flink.runtime.operators.coordination.CoordinationResponse> |
handleCoordinationRequest(org.apache.flink.runtime.operators.coordination.CoordinationRequest request) |
void |
handleEventFromOperator(int subtask,
int attemptNumber,
org.apache.flink.runtime.operators.coordination.OperatorEvent event) |
void |
notifyCheckpointComplete(long checkpointId) |
void |
resetToCheckpoint(long checkpointId,
byte[] checkpointData) |
void |
start() |
void |
subtaskReset(int subtask,
long checkpointId) |
public SchemaRegistry(String operatorName, org.apache.flink.runtime.operators.coordination.OperatorCoordinator.Context context, ExecutorService executorService, org.apache.flink.cdc.common.sink.MetadataApplier metadataApplier, List<org.apache.flink.cdc.common.route.RouteRule> routes)
public SchemaRegistry(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> routes, org.apache.flink.cdc.common.pipeline.SchemaChangeBehavior schemaChangeBehavior)
public void start()
throws Exception
start 在接口中 org.apache.flink.runtime.operators.coordination.OperatorCoordinatorExceptionpublic void close()
throws Exception
close 在接口中 AutoCloseableclose 在接口中 org.apache.flink.runtime.operators.coordination.OperatorCoordinatorExceptionpublic void handleEventFromOperator(int subtask,
int attemptNumber,
org.apache.flink.runtime.operators.coordination.OperatorEvent event)
handleEventFromOperator 在接口中 org.apache.flink.runtime.operators.coordination.OperatorCoordinatorpublic void checkpointCoordinator(long checkpointId,
CompletableFuture<byte[]> resultFuture)
checkpointCoordinator 在接口中 org.apache.flink.runtime.operators.coordination.OperatorCoordinatorpublic void notifyCheckpointComplete(long checkpointId)
notifyCheckpointComplete 在接口中 org.apache.flink.api.common.state.CheckpointListenernotifyCheckpointComplete 在接口中 org.apache.flink.runtime.operators.coordination.OperatorCoordinatorpublic CompletableFuture<org.apache.flink.runtime.operators.coordination.CoordinationResponse> handleCoordinationRequest(org.apache.flink.runtime.operators.coordination.CoordinationRequest request)
handleCoordinationRequest 在接口中 org.apache.flink.runtime.operators.coordination.CoordinationRequestHandlerpublic void resetToCheckpoint(long checkpointId,
@Nullable
byte[] checkpointData)
throws Exception
resetToCheckpoint 在接口中 org.apache.flink.runtime.operators.coordination.OperatorCoordinatorExceptionpublic void subtaskReset(int subtask,
long checkpointId)
subtaskReset 在接口中 org.apache.flink.runtime.operators.coordination.OperatorCoordinatorpublic void executionAttemptFailed(int subtask,
int attemptNumber,
@Nullable
Throwable throwable)
executionAttemptFailed 在接口中 org.apache.flink.runtime.operators.coordination.OperatorCoordinatorpublic void executionAttemptReady(int subtask,
int attemptNumber,
org.apache.flink.runtime.operators.coordination.OperatorCoordinator.SubtaskGateway subtaskGateway)
executionAttemptReady 在接口中 org.apache.flink.runtime.operators.coordination.OperatorCoordinator@VisibleForTesting public void handleApplyOriginalSchemaChangeEvent(org.apache.flink.cdc.common.event.SchemaChangeEvent schemaChangeEvent)
@VisibleForTesting public void handleApplyEvolvedSchemaChangeRequest(org.apache.flink.cdc.common.event.SchemaChangeEvent schemaChangeEvent)
Copyright © 2024 The Apache Software Foundation. All rights reserved.