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| Constructor and Description |
|---|
SchemaRegistry(String operatorName,
org.apache.flink.runtime.operators.coordination.OperatorCoordinator.Context context,
org.apache.flink.cdc.common.sink.MetadataApplier metadataApplier,
List<org.apache.flink.api.java.tuple.Tuple2<org.apache.flink.cdc.common.schema.Selectors,org.apache.flink.cdc.common.event.TableId>> routes) |
| Modifier and Type | Method and Description |
|---|---|
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) |
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, org.apache.flink.cdc.common.sink.MetadataApplier metadataApplier, List<org.apache.flink.api.java.tuple.Tuple2<org.apache.flink.cdc.common.schema.Selectors,org.apache.flink.cdc.common.event.TableId>> routes)
public void start()
throws Exception
start in interface org.apache.flink.runtime.operators.coordination.OperatorCoordinatorExceptionpublic void close()
throws Exception
close in interface AutoCloseableclose in interface org.apache.flink.runtime.operators.coordination.OperatorCoordinatorExceptionpublic void handleEventFromOperator(int subtask,
int attemptNumber,
org.apache.flink.runtime.operators.coordination.OperatorEvent event)
throws Exception
handleEventFromOperator in interface org.apache.flink.runtime.operators.coordination.OperatorCoordinatorExceptionpublic void checkpointCoordinator(long checkpointId,
CompletableFuture<byte[]> resultFuture)
throws Exception
checkpointCoordinator in interface org.apache.flink.runtime.operators.coordination.OperatorCoordinatorExceptionpublic void notifyCheckpointComplete(long checkpointId)
notifyCheckpointComplete in interface org.apache.flink.api.common.state.CheckpointListenernotifyCheckpointComplete in interface 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 in interface org.apache.flink.runtime.operators.coordination.CoordinationRequestHandlerpublic void resetToCheckpoint(long checkpointId,
@Nullable
byte[] checkpointData)
throws Exception
resetToCheckpoint in interface org.apache.flink.runtime.operators.coordination.OperatorCoordinatorExceptionpublic void subtaskReset(int subtask,
long checkpointId)
subtaskReset in interface org.apache.flink.runtime.operators.coordination.OperatorCoordinatorpublic void executionAttemptFailed(int subtask,
int attemptNumber,
@Nullable
Throwable throwable)
executionAttemptFailed in interface org.apache.flink.runtime.operators.coordination.OperatorCoordinatorpublic void executionAttemptReady(int subtask,
int attemptNumber,
org.apache.flink.runtime.operators.coordination.OperatorCoordinator.SubtaskGateway subtaskGateway)
executionAttemptReady in interface org.apache.flink.runtime.operators.coordination.OperatorCoordinatorCopyright © 2024 The Apache Software Foundation. All rights reserved.