一、XXL-JOB框架
XXL-JOB是一個(gè)輕量級(jí)分布式任務(wù)調(diào)度平臺(tái)。其具體部署和使用方式如下。
1.1 服務(wù)端
配置項(xiàng)
### 調(diào)度中心JDBC鏈接
spring.datasource.url=jdbc:mysql://81.68.79.183:3306/xxl_job?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&serverTimezone=Asia/Shanghai
spring.datasource.username=root
spring.datasource.password=XX
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
### 報(bào)警郵箱
spring.mail.host=smtp.163.com
spring.mail.port=25
spring.mail.username=18851703029@163.com
spring.mail.password=LHTMRTHQDDHALIXX
spring.mail.properties.mail.smtp.auth=true
spring.mail.properties.mail.smtp.starttls.enable=true
spring.mail.properties.mail.smtp.starttls.required=true
spring.mail.properties.mail.smtp.socketFactory.class=javax.net.ssl.SSLSocketFactory
### 調(diào)度中心通訊TOKEN [選填]:非空時(shí)啟用;
xxl.job.accessToken=
### 調(diào)度中心國(guó)際化配置 [必填]: 默認(rèn)為 "zh_CN"/中文簡(jiǎn)體, 可選范圍為 "zh_CN"/中文簡(jiǎn)體, "zh_TC"/中文繁體 and >"en"/英文;
xxl.job.i18n=zh_CN
## 調(diào)度線程池最大線程配置【必填】
xxl.job.triggerpool.fast.max=200
xxl.job.triggerpool.slow.max=100
### 調(diào)度中心日志表數(shù)據(jù)保存天數(shù) [必填]:過期日志自動(dòng)清理;限制大于等于7時(shí)生效,否則, 如-1,關(guān)閉自動(dòng)清理功能;
xxl.job.logretentiondays=30
創(chuàng)建數(shù)據(jù)庫(kù)表
#
# XXL-JOB v2.2.1-SNAPSHOT
# Copyright (c) 2015-present, xuxueli.
CREATE database if NOT EXISTS `xxl_job` default character set utf8mb4 collate utf8mb4_unicode_ci;
use `xxl_job`;
SET NAMES utf8mb4;
CREATE TABLE `xxl_job_info` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`job_group` int(11) NOT NULL COMMENT '執(zhí)行器主鍵ID',
`job_cron` varchar(128) NOT NULL COMMENT '任務(wù)執(zhí)行CRON',
`job_desc` varchar(255) NOT NULL,
`add_time` datetime DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
`author` varchar(64) DEFAULT NULL COMMENT '作者',
`alarm_email` varchar(255) DEFAULT NULL COMMENT '報(bào)警郵件',
`executor_route_strategy` varchar(50) DEFAULT NULL COMMENT '執(zhí)行器路由策略',
`executor_handler` varchar(255) DEFAULT NULL COMMENT '執(zhí)行器任務(wù)handler',
`executor_param` varchar(512) DEFAULT NULL COMMENT '執(zhí)行器任務(wù)參數(shù)',
`executor_block_strategy` varchar(50) DEFAULT NULL COMMENT '阻塞處理策略',
`executor_timeout` int(11) NOT NULL DEFAULT '0' COMMENT '任務(wù)執(zhí)行超時(shí)時(shí)間,單位秒',
`executor_fail_retry_count` int(11) NOT NULL DEFAULT '0' COMMENT '失敗重試次數(shù)',
`glue_type` varchar(50) NOT NULL COMMENT 'GLUE類型',
`glue_source` mediumtext COMMENT 'GLUE源代碼',
`glue_remark` varchar(128) DEFAULT NULL COMMENT 'GLUE備注',
`glue_updatetime` datetime DEFAULT NULL COMMENT 'GLUE更新時(shí)間',
`child_jobid` varchar(255) DEFAULT NULL COMMENT '子任務(wù)ID,多個(gè)逗號(hào)分隔',
`trigger_status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '調(diào)度狀態(tài):0-停止,1-運(yùn)行',
`trigger_last_time` bigint(13) NOT NULL DEFAULT '0' COMMENT '上次調(diào)度時(shí)間',
`trigger_next_time` bigint(13) NOT NULL DEFAULT '0' COMMENT '下次調(diào)度時(shí)間',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `xxl_job_log` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`job_group` int(11) NOT NULL COMMENT '執(zhí)行器主鍵ID',
`job_id` int(11) NOT NULL COMMENT '任務(wù),主鍵ID',
`executor_address` varchar(255) DEFAULT NULL COMMENT '執(zhí)行器地址,本次執(zhí)行的地址',
`executor_handler` varchar(255) DEFAULT NULL COMMENT '執(zhí)行器任務(wù)handler',
`executor_param` varchar(512) DEFAULT NULL COMMENT '執(zhí)行器任務(wù)參數(shù)',
`executor_sharding_param` varchar(20) DEFAULT NULL COMMENT '執(zhí)行器任務(wù)分片參數(shù),格式如 1/2',
`executor_fail_retry_count` int(11) NOT NULL DEFAULT '0' COMMENT '失敗重試次數(shù)',
`trigger_time` datetime DEFAULT NULL COMMENT '調(diào)度-時(shí)間',
`trigger_code` int(11) NOT NULL COMMENT '調(diào)度-結(jié)果',
`trigger_msg` text COMMENT '調(diào)度-日志',
`handle_time` datetime DEFAULT NULL COMMENT '執(zhí)行-時(shí)間',
`handle_code` int(11) NOT NULL COMMENT '執(zhí)行-狀態(tài)',
`handle_msg` text COMMENT '執(zhí)行-日志',
`alarm_status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '告警狀態(tài):0-默認(rèn)、1-無需告警、2-告警成功、3-告警失敗',
PRIMARY KEY (`id`),
KEY `I_trigger_time` (`trigger_time`),
KEY `I_handle_code` (`handle_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `xxl_job_log_report` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`trigger_day` datetime DEFAULT NULL COMMENT '調(diào)度-時(shí)間',
`running_count` int(11) NOT NULL DEFAULT '0' COMMENT '運(yùn)行中-日志數(shù)量',
`suc_count` int(11) NOT NULL DEFAULT '0' COMMENT '執(zhí)行成功-日志數(shù)量',
`fail_count` int(11) NOT NULL DEFAULT '0' COMMENT '執(zhí)行失敗-日志數(shù)量',
PRIMARY KEY (`id`),
UNIQUE KEY `i_trigger_day` (`trigger_day`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `xxl_job_logglue` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`job_id` int(11) NOT NULL COMMENT '任務(wù),主鍵ID',
`glue_type` varchar(50) DEFAULT NULL COMMENT 'GLUE類型',
`glue_source` mediumtext COMMENT 'GLUE源代碼',
`glue_remark` varchar(128) NOT NULL COMMENT 'GLUE備注',
`add_time` datetime DEFAULT NULL,
`update_time` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `xxl_job_registry` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`registry_group` varchar(50) NOT NULL,
`registry_key` varchar(255) NOT NULL,
`registry_value` varchar(255) NOT NULL,
`update_time` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `i_g_k_v` (`registry_group`,`registry_key`,`registry_value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `xxl_job_group` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`app_name` varchar(64) NOT NULL COMMENT '執(zhí)行器AppName',
`title` varchar(12) NOT NULL COMMENT '執(zhí)行器名稱',
`address_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '執(zhí)行器地址類型:0=自動(dòng)注冊(cè)、1=手動(dòng)錄入',
`address_list` varchar(512) DEFAULT NULL COMMENT '執(zhí)行器地址列表,多地址逗號(hào)分隔',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `xxl_job_user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(50) NOT NULL COMMENT '賬號(hào)',
`password` varchar(50) NOT NULL COMMENT '密碼',
`role` tinyint(4) NOT NULL COMMENT '角色:0-普通用戶、1-管理員',
`permission` varchar(255) DEFAULT NULL COMMENT '權(quán)限:執(zhí)行器ID列表,多個(gè)逗號(hào)分割',
PRIMARY KEY (`id`),
UNIQUE KEY `i_username` (`username`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `xxl_job_lock` (
`lock_name` varchar(50) NOT NULL COMMENT '鎖名稱',
PRIMARY KEY (`lock_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
INSERT INTO `xxl_job_group`(`id`, `app_name`, `title`, `address_type`, `address_list`) VALUES (1, 'xxl-job-executor-sample', '示例執(zhí)行器', 0, NULL);
INSERT INTO `xxl_job_info`(`id`, `job_group`, `job_cron`, `job_desc`, `add_time`, `update_time`, `author`, `alarm_email`, `executor_route_strategy`, `executor_handler`, `executor_param`, `executor_block_strategy`, `executor_timeout`, `executor_fail_retry_count`, `glue_type`, `glue_source`, `glue_remark`, `glue_updatetime`, `child_jobid`) VALUES (1, 1, '0 0 0 * * ? *', '測(cè)試任務(wù)1', '2018-11-03 22:21:31', '2018-11-03 22:21:31', 'XXL', '', 'FIRST', 'demoJobHandler', '', 'SERIAL_EXECUTION', 0, 0, 'BEAN', '', 'GLUE代碼初始化', '2018-11-03 22:21:31', '');
INSERT INTO `xxl_job_user`(`id`, `username`, `password`, `role`, `permission`) VALUES (1, 'admin', 'e10adc3949ba59abbe56e057f20f883e', 1, NULL);
INSERT INTO `xxl_job_lock` ( `lock_name`) VALUES ( 'schedule_lock');
commit;
Docker搭建XXL框架
①拉取鏡像
docker pull xuxueli/xxl-job-admin:2.2.0
②啟動(dòng)容器
docker run -p 8080:8080 --name xxl-job-admin -d \
-e PARAMS=" \
--spring.datasource.url=jdbc:mysql://81.68.79.183:3306/xxl_job?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&serverTimezone=Asia/Shanghai \
--spring.datasource.username=root \
--spring.datasource.password=XX \
--spring.datasource.driver-class-name=com.mysql.jdbc.Driver \
--spring.mail.host=smtp.163.com \
--spring.mail.port=25 \
--spring.mail.username=18851703029@163.com \
--spring.mail.password=LHTMRTHQDDHALIXX \
" xuxueli/xxl-job-admin:2.2.0
如需自定義 mysql 等配置,可通過 "-e PARAMS" 指定,參數(shù)格式 PARAMS="--key=value --key2=value2" ,如-e PARAMS='--spring.config.location=/application.properties'指定配置文件的位置;配置項(xiàng)參考文件:/xxl-job/xxl-job-admin/src/main/resources/application.properties;如需自定義 JVM內(nèi)存參數(shù) 等配置,可通過 "-e JAVA_OPTS" 指定,參數(shù)格式 JAVA_OPTS="-Xmx512m" ;
UI頁(yè)面訪問
UI訪問地址:http://81.68.79.183:8080/xxl-job-admin
賬號(hào):admin
密碼:123456
1.2 客戶端
依賴
<dependency>
<groupId>com.xuxueli</groupId>
<artifactId>xxl-job-core</artifactId>
<version>2.2.0</version>
</dependency>
配置文件
xxl:
job:
### 調(diào)度中心部署跟地址 [選填]:如調(diào)度中心集群部署存在多個(gè)地址則用逗號(hào)分隔。執(zhí)行器將會(huì)使用該地址進(jìn)行"執(zhí)行器心跳注冊(cè)"和"任務(wù)結(jié)果回調(diào)";為空則關(guān)閉自動(dòng)注冊(cè);
admin:
addresses: http://81.68.79.183:8080/xxl-job-admin
### 執(zhí)行器通訊TOKEN [選填]:非空時(shí)啟用;
accessToken:
executor:
### 執(zhí)行器AppName [選填]:執(zhí)行器心跳注冊(cè)分組依據(jù);為空則關(guān)閉自動(dòng)注冊(cè)
appname: xxl-job-executor-test
### 執(zhí)行器注冊(cè) [選填]:優(yōu)先使用該配置作為注冊(cè)地址,為空時(shí)使用內(nèi)嵌服務(wù) ”IP:PORT“ 作為注冊(cè)地址。從而更靈活的支持容器類型執(zhí)行器動(dòng)態(tài)IP和動(dòng)態(tài)映射端口問題。
address:
### 執(zhí)行器IP [選填]:默認(rèn)為空表示自動(dòng)獲取IP,多網(wǎng)卡時(shí)可手動(dòng)設(shè)置指定IP,該IP不會(huì)綁定Host僅作為通訊實(shí)用;地址信息用于 "執(zhí)行器注冊(cè)" 和 "調(diào)度中心請(qǐng)求并觸發(fā)任務(wù)";
ip:
### 執(zhí)行器端口號(hào) [選填]:小于等于0則自動(dòng)獲?。荒J(rèn)端口為9999,單機(jī)部署多個(gè)執(zhí)行器時(shí),注意要配置不同執(zhí)行器端口;
port: 10010
### 執(zhí)行器運(yùn)行日志文件存儲(chǔ)磁盤路徑 [選填] :需要對(duì)該路徑擁有讀寫權(quán)限;為空則使用默認(rèn)路徑;
logpath: /data/applogs/xxl-job/jobhandler
### 執(zhí)行器日志文件保存天數(shù) [選填] : 過期日志自動(dòng)清理, 限制值大于等于3時(shí)生效; 否則, 如-1, 關(guān)閉自動(dòng)清理功能;
logretentiondays: 30
配置類
@Configuration
public class XxlJobConfig {
@Value("${xxl.job.admin.addresses}")
private String adminAddresses;
@Value("${xxl.job.accessToken}")
private String accessToken;
@Value("${xxl.job.executor.appname}")
private String appname;
@Value("${xxl.job.executor.address}")
private String address;
@Value("${xxl.job.executor.ip}")
private String ip;
@Value("${xxl.job.executor.port}")
private int port;
@Value("${xxl.job.executor.logpath}")
private String logPath;
@Value("${xxl.job.executor.logretentiondays}")
private int logRetentionDays;
@Bean
public XxlJobSpringExecutor xxlJobExecutor() {
logger.info(">>>>>>>>>>> xxl-job config init.");
XxlJobSpringExecutor xxlJobSpringExecutor = new XxlJobSpringExecutor();
xxlJobSpringExecutor.setAdminAddresses(adminAddresses);
xxlJobSpringExecutor.setAppname(appname);
xxlJobSpringExecutor.setIp(ip);
xxlJobSpringExecutor.setPort(port);
xxlJobSpringExecutor.setAccessToken(accessToken);
xxlJobSpringExecutor.setLogPath(logPath);
xxlJobSpringExecutor.setLogRetentionDays(logRetentionDays);
return xxlJobSpringExecutor;
}
}
注解
1、在Spring Bean實(shí)例中,開發(fā)Job方法,方式格式要求為 "public ReturnT<String> execute(String param)"
2、為Job方法添加注解 "@XxlJob(value="自定義jobhandler名稱", init = "JobHandler初始化方法", destroy = "JobHandler銷毀方法")",注解value值對(duì)應(yīng)的是調(diào)度中心新建任務(wù)的JobHandler屬性的值。
3、執(zhí)行日志:需要通過 "XxlJobLogger.log" 打印執(zhí)行日志;
// 可參考Sample示例執(zhí)行器中的 "com.xxl.job.executor.service.jobhandler.SampleXxlJob" ,如下:
@XxlJob("demoJobHandler")
public ReturnT<String> execute(String param) {
XxlJobLogger.log("hello world.");
return ReturnT.SUCCESS;
}
客戶端配置完成XXL執(zhí)行器后,啟動(dòng)服務(wù)會(huì)自動(dòng)將執(zhí)行器的注冊(cè)到任務(wù)調(diào)度平臺(tái),@XxlJob("ScheduleDemo")唯一標(biāo)識(shí)了執(zhí)行器中的任務(wù),在創(chuàng)建任務(wù)時(shí)指定執(zhí)行器并選擇執(zhí)行器中的任務(wù),就可以指定該任務(wù)的調(diào)度計(jì)劃。
任務(wù)調(diào)度平臺(tái)執(zhí)行任務(wù)時(shí),會(huì)查詢執(zhí)行器的地址。向執(zhí)行器地址發(fā)送一個(gè)請(qǐng)求,讀取到當(dāng)前的jvm,在當(dāng)前jvm查找當(dāng)前注冊(cè)class信息地址,使用class反射執(zhí)行該方法。
創(chuàng)建任務(wù)
路由策略如下(包括容錯(cuò)規(guī)則):
image.png
集群模式注意點(diǎn)
執(zhí)行器支持集群部署,提升調(diào)度系統(tǒng)可用性,同時(shí)提升任務(wù)處理能力。
執(zhí)行器集群部署時(shí),幾點(diǎn)要求和建議:
執(zhí)行器回調(diào)地址(xxl.job.admin.addresses)需要保持一致;執(zhí)行器根據(jù)該配置進(jìn)行執(zhí)行器自動(dòng)注冊(cè)等操作。
同一個(gè)執(zhí)行器集群內(nèi)AppName(xxl.job.executor.appname)需要保持一致;調(diào)度中心根據(jù)該配置動(dòng)態(tài)發(fā)現(xiàn)不同集群的在線執(zhí)行器列表。
二、其他方式實(shí)現(xiàn)定時(shí)
- SpringBoot中定時(shí)任務(wù)注解@Scheduled(cron = "*/5 * * * * *")
- 線程池 execute ScheduledExecutorService
- 使用第三方框架 quartz
2.1 通過@Scheduled定時(shí)調(diào)度
@Scheduled(fixedRate = 1000 * 1)
public void fixedRate() throws Exception {
System.out.println("執(zhí)行測(cè)試fixedRate時(shí)間:"+ new Date(System.currentTimeMillis()));
Thread.sleep(2000);
}
@Schedule的屬性如下:
- cron屬性:
這是一個(gè)時(shí)間表達(dá)式,可以通過簡(jiǎn)單的配置就能完成各種時(shí)間的配置,我們通過CRON表達(dá)式幾乎可以完成任意的時(shí)間搭配;- fixedRate屬性:
該屬性的含義是上次調(diào)用開始后再次調(diào)用的時(shí)間間隔;- fixedDelay屬性:
該屬性的含義是上次調(diào)用結(jié)束與下次調(diào)用開始之間的時(shí)間間隔;- initialDelay屬性:
該屬性跟上面的fixedDelay、fixedRate有著密切的關(guān)系。該屬性的作用是第一次執(zhí)行延遲時(shí)間,只是做延遲的設(shè)定,并不會(huì)控制其他邏輯,所以要配合fixedDelay或者fixedRate來使用。
2.2 使用定時(shí)任務(wù)類
2.2.1 通過TimerTask類進(jìn)行任務(wù)調(diào)度
public class Demo {
public static void main(String[] args) {
TimerTask timerTask = new TimerTask() {
@Override
public void run() {
System.out.println(System.currentTimeMillis()/1000);
}
};
Timer timer = new Timer();
timer.schedule(timerTask,1000,2000); //第二個(gè)參數(shù)表示啟動(dòng)后1s開始執(zhí)行任務(wù),第三個(gè)參數(shù)表示每隔2s執(zhí)行任務(wù)
}
}
多線程并行處理定時(shí)任務(wù)時(shí),Timer 運(yùn)行多個(gè) TimeTask 時(shí),只要其中之一沒有捕獲拋出的異常,其它任務(wù)便會(huì)自動(dòng)終止運(yùn)行,使用 ScheduledExecutorService 則沒有這個(gè)問題。
2.2.2 ScheduledExecutorService 定時(shí)任務(wù)線程池
public class Demo {
public static void main(String[] args) {
ScheduledExecutorService scheduledThreadPool = Executors.newSingleThreadScheduledExecutor();
scheduledThreadPool.scheduleAtFixedRate(()->{
System.out.println(System.currentTimeMillis()/1000);},1,2,TimeUnit.SECONDS);
}
}
2.3 使用Quartz框架
依賴
<dependency>
<groupId>org.quartz-scheduler</groupId>
<artifactId>quartz</artifactId>
<version>2.2.1</version>
</dependency>
<dependency>
<groupId>org.quartz-scheduler</groupId>
<artifactId>quartz-jobs</artifactId>
<version>2.2.1</version>
</dependency>
Demo
public class QuartzJob implements Job {
/**
* 具體執(zhí)行任務(wù)調(diào)度代碼
*
* @param jobExecutionContext
* @throws JobExecutionException
*/
@Override
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
System.out.println("quartz任務(wù)調(diào)度成功!");
}
}
public class QuartzDemo {
public static void main(String[] args) throws SchedulerException {
//1.創(chuàng)建Scheduler的工廠
StdSchedulerFactory sf = new StdSchedulerFactory();
//2.從工廠中獲取調(diào)度器實(shí)例
Scheduler scheduler = sf.getScheduler();
//3.創(chuàng)建JobDetail
JobDetail jb = JobBuilder.newJob(QuartzJob.class)
.withDescription("this is a ram job") //job的描述
.withIdentity("ramJob", "ramGroup") //job的name和group
.build();
//任務(wù)運(yùn)行時(shí)間,SimpleSchedule類型觸發(fā)器有效
long time = System.currentTimeMillis() + 3 * 1000L; //3秒后啟動(dòng)任務(wù)
Date date = new Date(time);
//4.創(chuàng)建trigger
CronTrigger trigger = TriggerBuilder.newTrigger()
.withDescription("")
.withIdentity("ramTrigger", "ramTriggerGroup")
.startAt(date)
.withSchedule(CronScheduleBuilder.cronSchedule("0/2 * * * * ?")) //兩秒執(zhí)行一次
.build();
//5.注冊(cè)任務(wù)和定時(shí)器
scheduler.scheduleJob(jb, trigger);
//6.啟動(dòng)調(diào)度器
scheduler.start();
}
}
三、總結(jié)對(duì)比
常用的調(diào)度框架有Xxl-Job、Azkaban與Airflow,這三者目標(biāo)定位有所不同,Xxl-Job是一個(gè)輕量級(jí)分布式的任務(wù)調(diào)度框架,Azkaban則是為了解決Hadoop的任務(wù)依賴關(guān)系問題,而Airflow則是通用的批量數(shù)據(jù)處理。
Xxl-Job依賴于Xxl-Rpc,可以認(rèn)為是一個(gè)微服務(wù)系統(tǒng),調(diào)度中心是服務(wù)消費(fèi)者,調(diào)度器是服務(wù)提供者,只是服務(wù)調(diào)用不是通過訪問而是通過定時(shí)觸發(fā)而已。
Azkaban重心則在工作流調(diào)度,通過DSL語法定義工作流,同時(shí)支持子工作流,子工作流可以在主工作流中調(diào)度,也可單獨(dú)調(diào)度。
Airflow基于Dag也可以定義復(fù)雜的工作流,屬于Python技術(shù)棧。 總體來說,如果是簡(jiǎn)單的定時(shí)任務(wù)調(diào)度,可以選擇Xxl-Job,與主流Java框架Spring結(jié)合很好,上手簡(jiǎn)單快捷,功能夠用;如果調(diào)度任務(wù)有明確的workflow,需要對(duì)workflow狀態(tài)進(jìn)行監(jiān)控分析,則建議使用Azkaban,之所以不選擇Airflow,是因?yàn)樗墓芾斫缑娲_實(shí)太不好用了。

