zoukankan      html  css  js  c++  java
  • 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>.在后端查看任务执行的结果

  • 相关阅读:
    使用jaxb用xsd生成java类
    EMF保存CDATA
    windows builder里面的可伸缩面板
    使用eclipse open type对话框
    eclipse中toolbar位置的系统URI
    bzoj 4414 数量积 结论题
    bzoj 4402 Claris的剑 组合数学
    bzoj 4206 最大团 几何+lis
    bzoj 3676 [Apio2014]回文串 回文自动机
    bzoj 3670 [Noi2014]动物园 kmp
  • 原文地址:https://www.cnblogs.com/yinzhengjie/p/9233359.html
Copyright © 2011-2022 走看看