Shell 使用OOZIE将文件从HDFS的一个目录移动到HDFS中的另一个目录?

Shell 使用OOZIE将文件从HDFS的一个目录移动到HDFS中的另一个目录?,shell,hadoop,cloudera,oozie,oozie-coordinator,Shell,Hadoop,Cloudera,Oozie,Oozie Coordinator,作为oozie工作的一部分,我试图在shell脚本的帮助下将文件从HDFS的一个目录复制到HDFS中的另一个目录,但我无法通过oozie进行复制 我们可以使用oozie将文件从HDFS的一个目录复制到HDFS中的另一个控制器吗 when i am running the oozie job, i am not any getting error. it is showing status SUCCEEDED but file is not copying to destination dire

作为oozie工作的一部分,我试图在shell脚本的帮助下将文件从HDFS的一个目录复制到HDFS中的另一个目录,但我无法通过oozie进行复制

我们可以使用oozie将文件从HDFS的一个目录复制到HDFS中的另一个控制器吗

when i am running the oozie job, i am not any getting error.

it is showing status SUCCEEDED but file is not copying to destination directory.
oozie文件如下

test.sh

#!/bin/bash
echo "listing files in the current directory, $PWD"
sudo hadoop fs -cp /user/cloudera/RAVIOOZIE/input/*  /user/cloudera/RAVIOOZIE/output/
ls  # list files
我的workflow.xml是

<workflow-app name="RAMA" xmlns="uri:oozie:workflow:0.5">
<start to="shell-381c"/>
<kill name="Kill">
    <message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
</kill>
<action name="shell-381c">
    <shell xmlns="uri:oozie:shell-action:0.1">
        <job-tracker>${jobTracker}</job-tracker>
        <name-node>${nameNode}</name-node>
        <exec>/user/cloudera/test.sh</exec>
        <file>/user/cloudera/test.sh#test.sh</file>
          <capture-output/>
    </shell>
    <ok to="End"/>
    <error to="Kill"/>
</action>
<end name="End"/>
请帮忙。为什么文件没有复制到我的目标控制器


请让我知道我错过了什么

正如@Samson在评论中提到的:

如果您想使用oozie执行hadoop操作,那么应该使用一个而不是一个shell操作


我不确定你为什么没有得到一个错误,但这里有一些关于可能发生什么的猜测:


您将启动shell操作的任务交给oozie,它将成功启动shell操作并报告成功。然后shell操作失败,但这不是oozies的问题。

正如@Samson的评论中提到的:

如果您想使用oozie执行hadoop操作,那么应该使用一个而不是一个shell操作


我不确定你为什么没有得到一个错误,但这里有一些关于可能发生什么的猜测:


您将启动shell操作的任务交给oozie,它将成功启动shell操作并报告成功。然后shell操作失败,但这不是oozies的问题。

您的workflow.xml和shell脚本看起来不错。您可能需要仔细查找错误,即使它显示已成功。shell脚本中的echo语句被打印了吗?我可以在“jobhistory/logs”中看到echo语句,但没有显示任何错误。它显示在日志中“Oozie启动器,捕获输出数据:=====================================您好,cloudera。我想列出您的一些文件,列出当前目录中的文件,/var/lib/hadoop-thread/cache/thread/nm-local-dir/usercache/cloudera/appcache/application\u 1470284226059\u 0022/container\u 1470284226059\u 00ror。即“您的问题已标记”移动文件“但你的帖子实际上是关于复制文件的。如果您真的想移动这些文件,您应该尝试本机的Oozie HDFS操作。您的workflow.xml和shell脚本看起来不错。您可能需要仔细查找错误,即使它显示已成功。shell脚本中的echo语句被打印了吗?我可以在“jobhistory/logs”中看到echo语句,但没有显示任何错误。它显示在日志中“Oozie启动器,捕获输出数据:=====================================您好,cloudera。我想列出您的一些文件,列出当前目录中的文件,/var/lib/hadoop-thread/cache/thread/nm-local-dir/usercache/cloudera/appcache/application\u 1470284226059\u 0022/container\u 1470284226059\u 00ror。即“您的问题已标记”移动文件“但你的帖子实际上是关于复制文件的。如果您真的想移动这些文件,您应该尝试本机Oozie HDFS操作
oozie.use.system.libpath=True
security_enabled=False
dryrun=True
jobTracker=localhost:8032
nameNode=hdfs://quickstart.cloudera:8020
oozie.wf.application.path=${nameNode}/user/cloudera/test/