Azkaban02:配置job工作流
2020-06-23 本文已影响0人
勇于自信
在前面Azkaban部署并启动后,访问:http://master:8081/
查看azkaban-users.xml文件,登录用户和密码如下:
1.创建单任务:
1.1 在登录后的界面,点击创建按钮,创建一个任务:
1.2 创建三个文件并一起压缩为test.zip中(测试方式1)
文件1 test.flow:
---
config:
#failure.emails: xx@xx
nodes:
- name: test
type: command
config:
command: sh test.sh
文件2 test.project:
azkaban-flow-version: 2.0
文件3 test.sh
#!/bin/bash
yesterday=`date -d "-1 day" +"%Y%m%d"`
echo "Hello , $yesterday"
1.3 web端上传zip包
任务上传成功:
1.4 执行
step1:
step2:
step3:
执行成功:
补充:脚本编写方式二:
新建command.job:
type=command
command=echo "hello Azkaban~~"
打包为zip文件,上传,执行,成功执行:
2.创建多任务依赖:
创建foo.job文件:
type=command
command=echo "Hello 123"
创建bar.job文件:
type=command
dependencies=foo
command=echo "Hello 456"
压缩打包为dep.zip,上传,执行:
step1:
step2:
step3:
step4:
step5: