我正在尝试使用非常基本的脚本来运行oozie工作流程。该脚本本身非常简单,它需要一个csv文件并将其加载到impala中的表中。我的工作流程如下。
<workflow-app xmlns='uri:oozie:workflow:0.5' name='TEST'>
<global>
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<configuration>
<property>
<name>mapreduce.job.queuename</name>
<value>${queueName}</value>
</property>
</configuration>
</global>
<start to='postLoad' />
<action name="postLoad">
<shell xmlns="uri:oozie:shell-action:0.3">
<exec>${nameNode}/${baseCodePath}/Util/Test.sh</exec>
<env-var>impalaConn=${impalaConn}</env-var>
<env-var>xferUser=${xferUser}</env-var>
<env-var>ingUser=${ingUser}</env-var>
<env-var>explTableName=${explTableName}</env-var>
<env-var>stagingPath=${stagingPath}</env-var>
<file>${nameNode}/${baseCodePath}/Util/Test.sh</file>
<file>${nameNode}/${commonCodePath}/Util/loadUsrEnv.sh</file>
</shell>
...
但是,当我运行它时,我似乎总是会收到此错误,而且我不确定为什么它无法运行该程序。目录/文件都指向正确的位置。
Failing Oozie Launcher, Main class [org.apache.oozie.action.hadoop.ShellMain], main() threw exception, Cannot run program "Test.sh" (in directory "/data13/yarn/nm/usercache/user/appcache/application"): error=2, No such file or directory
java.io.IOException: Cannot run program "Test.sh" (in directory "/data13/yarn/nm/usercache/user/appcache/application"): error=2, No such file or directory
答案 0 :(得分:0)
使用
<exec>Test.sh</exec>
<file>
标签告诉Oozie将文件从HDFS位置下载到YARN容器目录