Azkaban的job从创建到执行

 

 

单一 job 

 

Step1: 创建 job 描述文件

xxx.job: job 的描述文件

type =   command
command =   echo 'hello, this is my first azkaban job'

Step2:将 job 描述文件打成 zip 文件

zip xxx.zip xxx.job

Azkaban 上传的工作流文件只支持 zip 文件。xxx.zip 中包含 job的描述文件:xxx.job

运行作业所需的文件和任何文件(文件名后缀必须以 .job 结尾,否则无法识别

作业名称在项目中必须是唯一的

 

Step3:在Azkaban的web管理平台创建 project并上传job的zip包

 

Step4:执行job

 

 

 

多 job

0

 

 

 

 

 

 

 

 

 

 

Step1:分别创建各个job的描述文件

#start.job
type =   command
command =   touch /opt/module/kangkang .txt


#step1.job
type =  command
dependencies=start
command =  echo "this is step1 job"


#step2.job
type =  command
dependencies=start
command =  echo "this is step2 job"


#finish.job
type =  command
dependencies=step1,step2
command =  echo "this is finish job"

 

Step2:将所有job的描述文件打到一个 zip 包中

zip jobs.zip start.job step1.job step2.job finish.job

 

Step3:在Azkaban的web管理平台创建 project并上传job的zip包

 

Step4:执行job

 

posted @ 2020-12-22 10:54  HOUHUILIN  阅读(327)  评论(0编辑  收藏  举报