Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/logging/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Oozie Suppress从shell作业操作记录?_Shell_Logging_Oozie - Fatal编程技术网

Oozie Suppress从shell作业操作记录?

Oozie Suppress从shell作业操作记录?,shell,logging,oozie,Shell,Logging,Oozie,我有一个运行shell脚本的简单工作流(见下文)。shell脚本运行pyspark脚本,该脚本将文件从本地移动到hdfs文件夹 当我运行shell脚本本身时,它工作得非常好,日志通过shell脚本中的>spark.txt 2>&1重定向到一个文件夹 但当我提交带有以下工作流的oozie作业时,shell的输出似乎被抑制了。我试图重定向所有可能的oozie日志(-verbose-log)>oozie.txt 2>&1,但没有帮助 工作流已成功完成(状态成功,无错误日志),但我看到,该文件夹未复制到

我有一个运行shell脚本的简单工作流(见下文)。shell脚本运行pyspark脚本,该脚本将文件从本地移动到hdfs文件夹

当我运行shell脚本本身时,它工作得非常好,日志通过shell脚本中的>spark.txt 2>&1重定向到一个文件夹

但当我提交带有以下工作流的oozie作业时,shell的输出似乎被抑制了。我试图重定向所有可能的oozie日志(-verbose-log)>oozie.txt 2>&1,但没有帮助

工作流已成功完成(状态成功,无错误日志),但我看到,该文件夹未复制到hdfs,但当我单独运行它时(不是通过oozie),一切正常

<action name="forceLoadFromLocal2hdfs">
<shell xmlns="uri:oozie:shell-action:0.1">
  <job-tracker>${jobTracker}</job-tracker>
  <name-node>${nameNode}</name-node>
  <configuration>
    <property>
      <name>mapred.job.queue.name</name>
      <value>${queueName}</value>
    </property>
  </configuration>
  <exec>driver-script.sh</exec>
  <argument>s</argument>
  <argument>script.py</argument>
  <!-- arguments for py script -->
  <argument>hdfsPath</argument>
  <argument>localPath</argument>
  <file>driver-script.sh#driver-script.sh</file>
</shell>
<ok to="end"/>
<error to="killAction"/>

根据建议,我在下面找到了完整的日志

yarn -logs -applicationId [application_xxxxxx_xxxx] 

Oozie作业在Thread容器中运行,StdErr/StdOut重定向到该容器的Thread日志(StdOut中还注入了大量Oozie调试信息;您的应用程序输出得到了一个特定的前缀,这样您就可以
grep
将其从混乱中解脱出来)。有关如何从Thread命令行访问这些日志的详细信息,请参阅我对的回答。或者,使用色调仪表板单击从Oozie工作流到Oozie操作,再到纱线应用程序,再到纱线应用程序日志.Thx的路径。我做了纱线原木。。。谢谢
yarn -logs -applicationId [application_xxxxxx_xxxx]