从oozie到Hue运行shell脚本 [英] Running shell script from oozie through Hue

查看:115
本文介绍了从oozie到Hue运行shell脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Hue中使用oozie编辑器调用bash shell脚本.

I am invoking a bash shell script using oozie editor in Hue.

我在工作流程中使用了shell动作,并在shell命令中尝试了以下不同选项:

I used the shell action in the workflow and tried below different options in shell command:

  1. 使用选择文件"上传shell脚本
  2. 提供存在shell脚本的本地目录路径
  3. 提供存在shell脚本的HDFS路径

但是所有这些选项都给出了以下错误:

But all these options gave following error:

无法运行程序"sec_test_oozie.sh"(在目录"/data/hadoop/yarn/local/usercache/user/appcache/application_1399542362142_0086/container_1399542362142_0086_01_000002"中):java.io.IOException:错误= 2,无此类文件或目录

Cannot run program "sec_test_oozie.sh" (in directory "/data/hadoop/yarn/local/usercache/user/appcache/application_1399542362142_0086/container_1399542362142_0086_01_000002"): java.io.IOException: error=2, No such file or directory

我应该如何给Shell脚本执行命令?Shell脚本文件应存放在哪里?

How should I give the shell script execution command? Where the shell script file should be residing?

推荐答案

我认为您是从Windows计算机创建文件的,该文件添加了额外的换行符.您需要将shell脚本文件转换为Unix格式.相同的问题.然后我从Linux系统创建了文件,该文件开始工作.错误是错误的.

I think you are creating the file from windows machine which is adding extra line break characters.You need to convert the shell script file to Unix format.I also faced the same issue.Then I created the file from a Linux system and it started working.The error is misguiding.

这篇关于从oozie到Hue运行shell脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆