实现一个调度任务,可能很简单。但是如何让工作流下的任务跑得更好、更快、更稳定、更具有扩展性,同时可视化,是值得我们去思考得问题。
Apache DolphinScheduler是一个分布式和可扩展的开源工作流协调平台,具有强大的DAG可视化界面,广泛应用于数据集成、数据分析和大规模数据迁移。
Master 整体启动流程
@PostConstruct
public void run() throws SchedulerException {
// init rpc server
this.masterRPCServer.start();
// install task plugin
this.taskPluginManager.loadPlugin();
// self tolerant
this.masterRegistryClient.start();
this.masterRegistryClient.setRegistryStoppable(this);
this.masterSchedulerBootstrap.init();
// 处理任务的核心 重点是处理任务
this.masterSchedulerBootstrap.start();
// 事件执行启动
this.eventExecuteService.start();
this.failoverExecuteThread.start();
this.schedulerApi.start();
Runtime.getRuntime().addShutdownHook(new Thread(() -> {
if (!ServerLifeCycleManager.isStopped()) {
c