我无法从我从Oozie工作流程执行的shell脚本添加/删除HDFS上的任何文件或目录。 用户名是" scitest"和我试图编辑/添加/删除的hdfs路径是 /用户/ scitest /.
在shell脚本中,我试图从路径/ user / scitest /中删除名为test123456的文件夹。
---------------来自oozie日志的错误------------------
429737-oozie-oozi-W@shell-node] Launcher ERROR, reason: Main class [org.apache.oozie.action.hadoop.ShellMain], exit code [1]
2016-12-27 05:04:25,553 INFO ActionEndXCommand:520 - SERVER[vscihadoopvm2.manhdev.com] USER[scitest] GROUP[-] TOKEN[] APP[shell.workflow] JOB[0000041-161208225429737-oozie-oozi-W] ACTION[0000041-161208225429737-oozie-oozi-W@shell-node] ERROR is considered as FAILED for SLA
--------- shell-script(sample.sh)内容----------
#!/bin/bash
echo "`date` hi" > output.log
hadoop fs -mkdir test123456
------- job.properties ---------
nameNode=hdfs://vscihadoopvm1.manhdev.com:8020
jobTracker=vscihadoopvm2.manhdev.com:8050
master=yarn-cluster
#user.name=yarn
queueName=default
examplesRoot=oozietest
oozie.use.system.libpath=true
oozie.wf.application.path=${nameNode}/user/${user.name}/${examplesRoot}
--- --- workflow.xml
<?xml version="1.0" encoding="UTF-8"?>
<workflow-app xmlns="uri:oozie:workflow:0.5" name="shell.workflow">
<start to="shell-node"/>
<action name="shell-node">
<shell xmlns="uri:oozie:shell-action:0.3">
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<configuration>
<property>
<name>mapred.job.queue.name</name>
<value>${queueName}</value>
</property>
</configuration>
<exec>sample.sh</exec>
<file>sample.sh#sample.sh</file>
</shell>
<ok to="end"/>
<error to="kill"/>
</action>
<kill name="kill">
<message>Error in Shell.Please refer the Oozie Logs</message>
</kill>
<end name="end"/>
</workflow-app>
答案 0 :(得分:0)
@Abhiroy,如果您可以查看您的oozie操作正在执行的用户,也许会更好。您只需在示例shell脚本中放置不带引号的“id”并运行工作流程。然后,您可以跟踪oozie作业日志,以查看oozie正在使用的示例脚本的容器执行程序。然后,如果您有任何权限问题,我们可以开始跟踪。