美文网首页
Oozie Shell工作流Workflows编写以及定时Coo

Oozie Shell工作流Workflows编写以及定时Coo

作者: 雪飘千里 | 来源:发表于2019-10-26 18:58 被阅读0次

    1、Shell工作流

    image.png image.png image.png image.png image.png
    • 注意:用nodepad++编写shell脚本之后要转换一下,不然linux下不能执行,会报java.io.IOException: Cannot run program,error=2, No such file or directory错误;因为windows的换行符 \r\n(CR LF) ,linux上识别不了 (llinux识别的是 \n (LF)),所以需要把shell脚本格式转换一下,如下图
    <pre style="padding: 9.5px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(68, 68, 68); border-radius: 0px; display: block; margin: 0px 0px 10px; line-height: 20px; word-break: break-all; overflow-wrap: break-word; white-space: pre-wrap; background-color: rgb(245, 245, 245); border-top: none; border-right: none; border-bottom: none; border-left: 5px solid rgb(221, 221, 221); border-image: initial; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; overflow: auto; height: 620px;">Failing Oozie Launcher, Main class [org.apache.oozie.action.hadoop.ShellMain], main() threw exception, Cannot run program "sensor_user_data_export_hdfs.sh" (in directory "[/data/yarn/nm/usercache/zhangkai/appcache/application_1571885914821_58055/container_e737_1571885914821_58055_01_000002](http://cdh.weilaijishi.com:8888/filebrowser/view=/data/yarn/nm/usercache/zhangkai/appcache/application_1571885914821_58055/container_e737_1571885914821_58055_01_000002)"): error=2, No such file or directory
    java.io.IOException: Cannot run program "sensor_user_data_export_hdfs.sh" (in directory "[/data/yarn/nm/usercache/zhangkai/appcache/application_1571885914821_58055/container_e737_1571885914821_58055_01_000002](http://cdh.weilaijishi.com:8888/filebrowser/view=/data/yarn/nm/usercache/zhangkai/appcache/application_1571885914821_58055/container_e737_1571885914821_58055_01_000002)"): error=2, No such file or directory
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
        at org.apache.oozie.action.hadoop.ShellMain.execute(ShellMain.java:102)
        at org.apache.oozie.action.hadoop.ShellMain.run(ShellMain.java:61)
        at org.apache.oozie.action.hadoop.LauncherMain.run(LauncherMain.java:49)
        at org.apache.oozie.action.hadoop.ShellMain.main(ShellMain.java:53)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.apache.oozie.action.hadoop.LauncherMapper.map(LauncherMapper.java:236)
        at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:54)
        at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:4</pre>
    
    
    image.png image.png

    定时调度

    • 1、新建调度任务


      image.png
    image.png image.png image.png
    • 2、提交调度任务
    image.png image.png image.png image.png

    相关文章

      网友评论

          本文标题:Oozie Shell工作流Workflows编写以及定时Coo

          本文链接:https://www.haomeiwen.com/subject/enhuvctx.html