oozie作业失败,错误JA009:错误的conf文件

时间:2016-03-07 08:07:40

标签: hive oozie bigdata

我是oozie的新手,并努力使用以下oozie作业运行一个简单的hiveql。在workflow.xml和job.properties之后使用。

workflow.xml

<workflow-app xmlns="uri:oozie:workflow:0.2" name="init">
  <start to="step1"/>
  <action name="step1">
        <hive xmlns="uri:oozie:hive-action:0.2">
            <job-tracker>abc</job-tracker>
            <name-node>def:8020</name-node>
            <job-xml>workflow.xml</job-xml>
            <configuration>
                <property>
                  <name>mapred.child.java.opts</name>
                  <value>-Xmx1500m</value>
                </property>
                <property>
                  <name>io.sort.mb</name>
                  <value>500</value>
                </property>
                <property>
                  <name>dfs.block.size</name>
                  <value>536870912</value>
                </property>
            </configuration>
            <script>oozie_hive_test.hql</script>
            <param>jarpath=/data/lib/oozie</param>
        </hive>
        <ok to="end"/>
        <error to="end"/>
  </action>
  <end name="end"/>
</workflow-app>

job.properties

emailTo=abc@def.com
oozie.libpath=/data/bdegrp/lib/oozie
oozie.wf.application.path=/user/an31416/oozie/oozie_test
oozieLauncherJavaOpts=-Xmx1500m

运行使用的命令

oozie job -oozie http://xyz:11000/oozie -config ./oozie_test/job.properties -run

但它没有跟随错误。

ID                                                                            Status    Ext ID                 Ext Status Err Code  
------------------------------------------------------------------------------------------------------------------------------------
0000021-160219180700519-oozie-oozi-W@:start:                                  OK        -                      OK         -         
------------------------------------------------------------------------------------------------------------------------------------
0000021-160219180700519-oozie-oozi-W@step1                                    START_RETRY-                      -          JA009     

ID : 0000021-160219180700519-oozie-oozi-W@step1
------------------------------------------------------------------------------------------------------------------------------------
Console URL       : -
Error Code        : JA009
Error Message     : JA009: bad conf file: top-level element not <configuration>
External ID       : -
External Status   : -
Name              : step1
Retries           : 0
Tracker URI       : -
Type              : hive
Started           : -
Status            : START_MANUAL
Ended             : -

你能帮我找到解决这个问题的可能原因。

1 个答案:

答案 0 :(得分:0)

Oozie期望标记hive-site.xml中的<job-xml>文件,只需将该文件的副本放在HDFS中并使用其路径如下:

 <job-xml>/path/from/root/hive-site.xml</job-xml>