Azkaban多Executor模式是指,在集群中多个节点部署Executor。在这种模式下, Azkaban web Server会根据策略,选取其中一个Executor去执行任务。
由于我们需要交给Azkaban调度的脚本,以及脚本需要的Hive,Sqoop等应用只在hadoop102部署了,为保证任务顺利执行,我们须在以下两种方案任选其一,推荐使用方案二。
方案一:指定特定的Executor(hadoop102)去执行任务。
1)在MySQL中azkaban数据库executors表中,查询hadoop102上的Executor的id。
mysql> use azkaban;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> select * from executors;
±—±----------±------±-------+
| id | host | port | active |
±—±----------±------±-------+
| 1 | hadoop103 | 35985 | 1 |
| 2 | hadoop104 | 36363 | 1 |
|
3| hadoop102 | 12321 | 1 |±—±----------±------±-------+
3 rows in set (0.00 sec)
2)在执行工作流程时加入useExecutor属性,如下

方案二:在Executor所在所有节点部署任务所需脚本和应用。
1)分发脚本、hive、sqoop、spark、my_env.sh
本文探讨了Azkaban多Executor模式下如何确保任务在仅有hadoop102部署相应应用的情况下执行,提供了指定Executor执行和在各节点部署脚本的两种方案,并重点介绍了如何在MySQL中查找对应Executor ID和方案二的实施步骤。
1276

被折叠的 条评论
为什么被折叠?



