Class DefaultOperatorCoordinatorHandler
- java.lang.Object
-
- org.apache.flink.runtime.scheduler.DefaultOperatorCoordinatorHandler
-
- All Implemented Interfaces:
OperatorCoordinatorHandler
public class DefaultOperatorCoordinatorHandler extends Object implements OperatorCoordinatorHandler
Default handler for theOperatorCoordinators
.
-
-
Constructor Summary
Constructors Constructor Description DefaultOperatorCoordinatorHandler(ExecutionGraph executionGraph, GlobalFailureHandler globalFailureHandler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletableFuture<CoordinationResponse>
deliverCoordinationRequestToCoordinator(OperatorID operator, CoordinationRequest request)
Deliver coordination request from the client to the coordinator.void
deliverOperatorEventToCoordinator(ExecutionAttemptID taskExecutionId, OperatorID operatorId, OperatorEvent evt)
Delivers an OperatorEvent to aOperatorCoordinator
.void
disposeAllOperatorCoordinators()
Dispose all operator coordinators.void
initializeOperatorCoordinators(ComponentMainThreadExecutor mainThreadExecutor)
Initialize operator coordinators.void
registerAndStartNewCoordinators(Collection<OperatorCoordinatorHolder> coordinators, ComponentMainThreadExecutor mainThreadExecutor, int parallelism)
Register and start new operator coordinators.void
startAllOperatorCoordinators()
Start all operator coordinators.
-
-
-
Constructor Detail
-
DefaultOperatorCoordinatorHandler
public DefaultOperatorCoordinatorHandler(ExecutionGraph executionGraph, GlobalFailureHandler globalFailureHandler)
-
-
Method Detail
-
initializeOperatorCoordinators
public void initializeOperatorCoordinators(ComponentMainThreadExecutor mainThreadExecutor)
Description copied from interface:OperatorCoordinatorHandler
Initialize operator coordinators.- Specified by:
initializeOperatorCoordinators
in interfaceOperatorCoordinatorHandler
- Parameters:
mainThreadExecutor
- Executor for submitting work to the main thread.
-
startAllOperatorCoordinators
public void startAllOperatorCoordinators()
Description copied from interface:OperatorCoordinatorHandler
Start all operator coordinators.- Specified by:
startAllOperatorCoordinators
in interfaceOperatorCoordinatorHandler
-
disposeAllOperatorCoordinators
public void disposeAllOperatorCoordinators()
Description copied from interface:OperatorCoordinatorHandler
Dispose all operator coordinators.- Specified by:
disposeAllOperatorCoordinators
in interfaceOperatorCoordinatorHandler
-
deliverOperatorEventToCoordinator
public void deliverOperatorEventToCoordinator(ExecutionAttemptID taskExecutionId, OperatorID operatorId, OperatorEvent evt) throws FlinkException
Description copied from interface:OperatorCoordinatorHandler
Delivers an OperatorEvent to aOperatorCoordinator
.- Specified by:
deliverOperatorEventToCoordinator
in interfaceOperatorCoordinatorHandler
- Parameters:
taskExecutionId
- Execution attempt id of the originating task.operatorId
- OperatorId of the target OperatorCoordinator.evt
- Event to deliver to the OperatorCoordinator.- Throws:
FlinkException
- If no coordinator is registered for operator.
-
deliverCoordinationRequestToCoordinator
public CompletableFuture<CoordinationResponse> deliverCoordinationRequestToCoordinator(OperatorID operator, CoordinationRequest request) throws FlinkException
Description copied from interface:OperatorCoordinatorHandler
Deliver coordination request from the client to the coordinator.- Specified by:
deliverCoordinationRequestToCoordinator
in interfaceOperatorCoordinatorHandler
- Parameters:
operator
- Id of target operator.request
- request for the operator.- Returns:
- Future with the response.
- Throws:
FlinkException
- If the coordinator doesn't exist or if it can not handle the request.
-
registerAndStartNewCoordinators
public void registerAndStartNewCoordinators(Collection<OperatorCoordinatorHolder> coordinators, ComponentMainThreadExecutor mainThreadExecutor, int parallelism)
Description copied from interface:OperatorCoordinatorHandler
Register and start new operator coordinators.- Specified by:
registerAndStartNewCoordinators
in interfaceOperatorCoordinatorHandler
- Parameters:
coordinators
- the operator coordinator to be registered.mainThreadExecutor
- Executor for submitting work to the main thread.
-
-