Azkaba built-in task types support command, java
Command type single job example
1, create a job description file
vi command.job
command.job
type = command
command = echo 'hello'
2, the job resource files packaged into a zip file
zip command.job
3, through the azkaban web management platform to create a project and upload the job archive
First create the project
Upload zip package
4, start the implementation of the job
Command type multiple job workflow flow
1, create a dependency of multiple job description
The first job: foo.job
foo.job
type = command
command = echo foo
The second job: bar.job depends on foo.job
bar.job
type = command
dependencies = foo
command = echo bar
2, all job resource files hit a zip package
3, create a project in azkaban web management interface and upload zip package
4, start the workflow flow
HDFS operation task
1, create a job description file
fs.job
type = command
command = / home / hadoop / apps / hadoop-2.6.1 / bin / hadoop fs -mkdir / azaz
2, the job resource files packaged into a zip file
3, through the azkaban web management platform to create a project and upload the job archive
4, start the implementation of the job
MAPREDUCE task
Mr task still can use the command's job type to execute
1, create a job description file, and mr program jar package (example directly use hadoop own example jar)
mrwc.job
type = command
command = / home / hadoop / apps / hadoop-2.6.1 / bin / hadoop jar hadoop-mapreduce-examples-2.6.1.jar wordcount / wordcount / input / wordcount / azout
2, all job resource files hit a zip package
3, create a project in azkaban web management interface and upload zip package
4, start the job
HIVE script task
Create a job description file and hive script
Hive script: test.sql
use default;
drop table aztest;
create table aztest (id int, name string) row format delimited fields terminated by ',';
load data inpath '/ aztest / hiveinput' into table aztest;
create table azres as select * from aztest;
insert overwrite directory '/ aztest / hiveoutput' select count (1) from aztest;
Job description file: hivef.job
hivef.job
type = command
command = / home / hadoop / apps / hive / bin / hive -f 'test.sql'
2, all job resource files hit a zip package
3, create a project in azkaban web management interface and upload zip package
4, start the job