Oozie supress logging from shell job action?

荒凉一梦 提交于 2019-12-04 05:33:59

问题


I have a simple workflow (see below) which runs a shell script. The shell script runs pyspark script, which moves file from local to hdfs folder.

When I run the shell script itself, it works perfectly, logs are redirect to a folder by > spark.txt 2>&1 right in the shell script.

But when I submit oozie job with following workflow, output from shell seems to be supressed. I tried to redirect all possible oozie logs (-verbose -log) > oozie.txt 2>&1, but it didn't help.

The workflow is finished successfuly (status SUCCESSEDED, no error log), but I see, the folder is not copied to hdfs, however when I run it alone (not through oozie), everything is fine.

<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"/>

Thx a lot!

EDIT: Thx to the advice I found full log under the

yarn -logs -applicationId [application_xxxxxx_xxxx] 

回答1:


Thx to the advice I found full log under the

yarn -logs -applicationId [application_xxxxxx_xxxx] 


来源:https://stackoverflow.com/questions/45322251/oozie-supress-logging-from-shell-job-action

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!