1. Command类型之单一job
- 创建job描述文件
vim command.job type=command command=echo "hello,world"
- 将job资源文件打包成zip文件
- 通过azkaban的web管理平台创建project并上传job压缩包
- 启动执行该job
- 查看结果 ( cat /usr/local/azkaban-2.5.0/server/executions/1/_job.1.command01.log )
2. Command类型之多job工作流
- 创建有依赖关系的多个job描述
// 第一个job:test01.job type=command command=echo test01 //第二个job:test02.job依赖test01.job type=command dependencies=test01 command=echo test03
- 将所有job资源文件打到一个zip包中
- 通过azkaban的web管理平台创建project并上传job压缩包
- 启动执行该job
- 查看结果
3. HDFS操作任务
- 创建job描述文件
vim hdfs.job type=command command=hadoop fs -mkdir /azkaban
- 将所有job资源文件打到一个zip包中
- 通过azkaban的web管理平台创建project并上传job压缩包
- 启动执行该job
- 查看结果
4. HIVE脚本任务
- 创建job描述文件和hive脚本
// Hive脚本: vim test.sql use test01; drop table aztest; create table aztest(id int,name string) row format delimited fields terminated by ','; load data local inpath '/home/test/test02/az.txt' into table aztest; drop table azresult; create table azresult as select * from aztest; insert overwrite directory '/aztest/hiveoutput' select count(1) from aztest; // Job描述文件: vim hive.job type=command command=hive -f /home/test/test02/test.sql
- 将所有job资源文件打到一个zip包中
- 通过azkaban的web管理平台创建project并上传job压缩包
- 启动执行该job
- 查看结果