美文网首页调度工具Azkaban
Azkaban02:配置job工作流

Azkaban02:配置job工作流

作者: 勇于自信 | 来源:发表于2020-06-23 19:02 被阅读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:


相关文章

网友评论

    本文标题:Azkaban02:配置job工作流

    本文链接:https://www.haomeiwen.com/subject/dwnhfktx.html