Azkaban combat

Source: Internet
Author: User
Keywords java Azkaban job description file
Tags apps archive create echo example file files hadoop

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

Related Keywords:
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.