Hadoop生态圈-Azkaban实战之Command类型执行指定脚本

              Hadoop生态圈-Azkaban实战之Command类型执行指定脚本

                                            作者:尹正杰

版权声明:原创作品,谢绝转载!否则将追究法律责任。

 

 

 

 

 

1>.服务端测试代码(别忘记添加权限哟!)

 1 [yinzhengjie@s101 ~]$ more /home/yinzhengjie/shell/createLog.sh
 2 #!/bin/bash
 3 #@author :yinzhengjie
 4 #blog:http://www.cnblogs.com/yinzhengjie
 5 #EMAIL:y1053419035@qq.com
 6 
 7 mypath=/home/yinzhengjie/date
 8 
 9 day=`date | awk '{print $4}' | awk -F ':' '{print $2}'`
10 
11 if [ -d $mypath ] 
12 then 
13     echo 目录已经存在!
14 else 
15     mkdir $mypath
16     echo 目录已经创建!  
17 fi
18 
19 cd $mypath
20 
21 touch yinzhengjie_$day.log
22 [yinzhengjie@s101 ~]$
23 [yinzhengjie@s101 ~]$ chmod a+x /home/yinzhengjie/shell/createLog.sh
24 [yinzhengjie@s101 ~]$ 
25 [yinzhengjie@s101 ~]$ ll /home/yinzhengjie/shell/createLog.sh 
26 -rwxrwxr-x 1 yinzhengjie yinzhengjie 333 Jun 26 21:09 /home/yinzhengjie/shell/createLog.sh
27 [yinzhengjie@s101 ~]$ 

2>.Windows端的job任务

type=command
command=/home/yinzhengjie/shell/createLog.sh

3>.在azkaban的web界面创建项目

4>.将我们压缩好的zip文件上传上去

 

5>.点击Execute Flow

6>.自定义脚本的执行周期

7>.编辑周期性任务

8>.点击继续

9>.查看下一个执行时间

10>.在web端查看任务的执行详细信息(将光标放在执行绿点和红点可以看到执行时话费的时间)

 

11>.在后端查看任务执行的结果

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值