Package org.apache.flink.table.workflow
Interface WorkflowScheduler<T extends RefreshHandler>
- Type Parameters:
T- The type ofRefreshHandlerused by specificWorkflowSchedulerto locate the refresh workflow in scheduler service.
This interface is used to interact with specific workflow scheduler services that support
creating, modifying, and deleting refreshed workflow of Materialized Table.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close this workflow scheduler when it is no longer needed and release any resource that it might be holding.createRefreshWorkflow(CreateRefreshWorkflow createRefreshWorkflow) Create a refresh workflow in specific scheduler service for the materialized table, return aRefreshHandlerinstance which can locate the refresh workflow detail information.voiddeleteRefreshWorkflow(DeleteRefreshWorkflow<T> deleteRefreshWorkflow) Delete the refresh workflow in scheduler service.Return aRefreshHandlerSerializerinstance to serialize and deserializeRefreshHandlercreated by specific workflow scheduler service.voidmodifyRefreshWorkflow(ModifyRefreshWorkflow<T> modifyRefreshWorkflow) Modify the refresh workflow status in scheduler service.voidopen()Open this workflow scheduler instance.
-
Method Details
-
open
Open this workflow scheduler instance. Used for any required preparation in initialization phase.- Throws:
WorkflowException- if initializing workflow scheduler occur exception
-
close
Close this workflow scheduler when it is no longer needed and release any resource that it might be holding.- Throws:
WorkflowException- if closing the related resources of workflow scheduler failed
-
getRefreshHandlerSerializer
RefreshHandlerSerializer<T> getRefreshHandlerSerializer()Return aRefreshHandlerSerializerinstance to serialize and deserializeRefreshHandlercreated by specific workflow scheduler service. -
createRefreshWorkflow
Create a refresh workflow in specific scheduler service for the materialized table, return aRefreshHandlerinstance which can locate the refresh workflow detail information.This method supports creating workflow for periodic refresh, as well as workflow for a one-time refresh only.
- Parameters:
createRefreshWorkflow- The detail info for create refresh workflow of materialized table.- Returns:
- The meta info which points to the refresh workflow in scheduler service.
- Throws:
WorkflowException- if creating refresh workflow failed
-
modifyRefreshWorkflow
Modify the refresh workflow status in scheduler service. This includes suspend, resume, modify schedule cron operation, and so on.- Parameters:
modifyRefreshWorkflow- The detail info for modify refresh workflow of materialized table.- Throws:
WorkflowException- if modify refresh workflow failed
-
deleteRefreshWorkflow
Delete the refresh workflow in scheduler service.- Parameters:
deleteRefreshWorkflow- The detail info for delete refresh workflow of materialized table.- Throws:
WorkflowException- if delete refresh workflow failed
-