azkaban使用
新建一个text文件,a.job,打包成zip包传到azkaban即可

方式1:job流
1. a.job内容范例:
type=command
command=hive shell
command=hive -e 'set hive.execution.engine=tez;'
command=hive -e 'select * from hivedb.t_user limit 5;'
2.写法2:
zip包里放job和sql文件,如图

vip_ods.job:
type=command
command=hive -f vip_ods.sql
vip_ods.sql:
use hivedb;
insert overwrite table hive_tb1 SELECT id,name from user;
insert overwrite table hive_tb2 SELECT id,name from food;
以下是依赖关系阐述: 第二个job:bar.job依赖foo.job
# bar.job
type=command
dependencies=foo
command=echo bar
方式2:flow流
以下摘自官网
Creating Flows
This section covers how to create your Azkaban flows using Azkaban Flow 2.0. Flow 1.0 will be deprecated in the future.
Flow 2.0 Basics
Step 1:
Create a simple file called flow20.project. Add azkaban-flow-version to indicate this is a Flow 2.0 Azkaban project:
azkaban-flow-version: 2.0
Step 2:
Create another file called basic.flow. Add a section called nodes, which will contain all the jobs you want to run. You need to specify name and type for all the jobs. Most jobs will require the config section as well. We will talk more about it later. Below is a simple example of a command job.
nodes:
- name: jobA
type: command
config:
command: echo "This is an echoed text."
Step 3:
Select the two files you’ve already created and right click to compress them into a zip file called Archive.zip. You can also create a new directory with these two files and then cd into the new directory and compress: zip -r Archive.zip . Please do not zip the new directory directly.
Make sure you have already created a project on Azkaban ( See Create Projects ). You can then upload Archive.zip to your project through Web UI ( See Upload Projects ).
Now you can click Execute Flow to test your first Flow 2.0 Azkaban project!
Job Dependencies
Jobs can have dependencies on each other. You can use dependsOn section to list all the parent jobs. In the below example, after jobA and jobB run successfully, jobC will start to run.
nodes:
- name: jobC
type: noop
# jobC depends on jobA and jobB
dependsOn:
- jobA
- jobB - name: jobA
type: command
config:
command: echo "This is an echoed text." - name: jobB
type: command
config:
command: pwd
You can zip the new basic.flow and flow20.project again and then upload to Azkaban. Try to execute the flow and see the difference.
Job Config
Azkaban supports many job types. You just need to specify it in type, and other job-related info goes to config section in the format of key: value pairs. Here is an example for a Pig job:
nodes:
- name: pigJob
type: pig
config:
pig.script: sql/pig/script.pig
You need to write your own pig script and put it in your project zip and then specify the path for the pig.script in the config section.
Flow Config
Not only can you configure individual jobs, you can also config the flow parameters for the entire flow. Simply add a config section at the beginning of the basic.flow file. For example:
---
config:
user.to.proxy: foo
failure.emails: noreply@foo.com nodes:
- name: jobA
type: command
config:
command: echo "This is an echoed text."
When you execute the flow, the user.to.proxy and failure.emails flow parameters will apply to all jobs inside the flow.
Embedded Flows
Flows can have subflows inside the flow just like job nodes. To create embedded flows, specify the type of the node as flow. For example:
nodes:
- name: embedded_flow
type: flow
config:
prop: value
nodes:
- name: jobB
type: noop
dependsOn:
- jobA - name: jobA
type: command
config:
command: pwd
azkaban使用的更多相关文章
- 从源码看Azkaban作业流下发过程
上一篇零散地罗列了看源码时记录的一些类的信息,这篇完整介绍一个作业流在Azkaban中的执行过程,希望可以帮助刚刚接手Azkaban相关工作的开发.测试. 一.Azkaban简介 Azkaban作为开 ...
- 初识Azkaban
先说下hadoop 内置工作流的不足 (1)支持job单一 (2)硬编码 (3)无可视化 (4)无调度机制 (5)无容错机制 在这种情况下Azkaban就出现了 1)Azkaban是什么 Azkaba ...
- Azkaban 2.5.0 job type 插件安装
一.环境及软件 安装环境: 安装目录: /usr/local/ae/ankaban Hadoop 安装目录 export HADOOP_HOME=/usr/local/ae/hadoop-1.2.1 ...
- Azkaban 2.5.0 搭建
一.前言 最近试着参照官方文档搭建 Azkaban,发现文档很多地方有坑,所以在此记录一下. 二.环境及软件 安装环境: 系统环境: ubuntu-12.04.2-server-amd64 安装目录: ...
- Hadoop - Azkaban 作业调度
1.概述 在调度 Hadoop 的相关作业时,有以下几种方式: 基于 Linux 系统级别的 Crontab. Java 应用级别的 Quartz. 第三方的调度系统. 自行开发 Hadoop 应用调 ...
- hadoop工作流引擎之azkaban [转]
介绍 Azkaban是twitter出的一个任务调度系统,操作比Oozie要简单很多而且非常直观,提供的功能比较简单.Azkaban以Flow为执行单元进行定时调度,Flow就是预定义好的由一个或多个 ...
- Azkaban遇到的坑-installation Failed.Error chunking
在使用azkaban做spark作业调度时,在上传zip包时报installation Failed.Error chunking错误,原来是于我们所编写的应用会上传到 MySQL 存储,过大的zip ...
- Oozie和Azkaban的技术选型和对比
1 两种调度工具功能对比图 下面的表格对上述2种hadoop工作流调度器的关键特性进行了比较,尽管这些工作流调度器能够解决的需求场景基本一致,但在设计理念,目标用户,应用场景等方面还是存在区别 特性 ...
- Harry Potter and the Prisoner of Azkaban
称号:Harry Potter and the Prisoner of Azkaban 作者:J.K. Rowling 篇幅: 448页 蓝思值:880L 用时: 11天 工具: 有道词典 [ ...
- hadoop工作流引擎之azkaban
Azkaban是twitter出的一个任务调度系统,操作比Oozie要简单很多而且非常直观,提供的功能比较简单.Azkaban以Flow为执行单元进行定时调度,Flow就是预定义好的由一个或多个可存在 ...
随机推荐
- vue中如何让多个echarts随屏幕大小变化
在vue项目中使用Echarts 一般window.onsize在页面中只能存在一个. 如何在一个页面中多个echarts使用window.onresize? myChart 可以放在Data ...
- python答题辅助
最近直播答题app很热门,由于之前看过跳一跳的python脚本(非常棒),于是也想写一个答题的脚本. https://github.com/huanmsf/cai 思路: 1.截图 2.文字识别,提取 ...
- 【转】python操作excel表格(xlrd/xlwt)
[转]python操作excel表格(xlrd/xlwt) 最近遇到一个情景,就是定期生成并发送服务器使用情况报表,按照不同维度统计,涉及python对excel的操作,上网搜罗了一番,大多大同小异, ...
- Python3 GIL(Global Interpreter Lock)与多线程
GIL(Global Interpreter Lock)与多线程 GIL介绍 GIL与Lock GIL与多线程 多线程性能测试 在Cpython解释器中,同一个进程下开启的多线程,同一时刻只能有一个线 ...
- Nginx 测试环境配置,留作笔记使用
Nginx 测试环境配置,留做笔记 以下全是配置文件的配置,如果有疑问还请移步Nginx官网参考官方文档. 环境: [root@CentOS6-M01 conf]# cat /etc/redhat-r ...
- 关于VC工程编译不过去这件事
刚开始接触VC的时候,很大一部分时间是在对付编译链接错误,因为经验不足的原因,这些编译链接总让人很沮丧.比如: 1.fatal error LNK1104: 无法打开文件“LIBC.lib”错误 这个 ...
- Apollo 代码的编译演示
Apollo 代码的编译演示 官方的文档 -- 运行线下演示 如果你没有车辆及车载硬件, Apollo还提供了一个计算机模拟环境,可用于演示和代码调试. 线下演示需要设置docker的release环 ...
- jquery datetimepicker
1.详细说明见:https://xdsoft.net/jqplugins/datetimepicker/ 语言选择中文,现在lang配置已经失效;可用: $.datetimepicker.setLoc ...
- 使用Vagrant搭建本地python开发环境
使用Vagrant搭建本地python开发环境 关于vagrant:Vagrant是一个基于Ruby的工具,用于创建和部署虚拟化开发环境,它使用Oracle的开源VirtualBox虚拟化系统也可以使 ...
- 我的大学,我的SPR机器人队
时间过的真快,我这个在协会呆了好多年的老油条今年都毕业了,在石油大学大学七年几乎三分之二的时间就是在协会度过的.实话说在北京这是我最亲切的地方,这里有我喜欢的各种设备,有亲爱的老师和一起奋斗的队友,在 ...