Oozie作业错误 - java.io.IOException:未指定配置

时间:2015-04-25 09:51:59

标签: hadoop hdfs oozie

我为hive脚本创建了一个oozie工作流,以便在表格中加载数据。

我的workflow.xml包含 -

<workflow-app xmlns="uri:oozie:workflow:0.4" name="Hive-Table-Insertion">
  <start to="InsertData"/>

  <action name="InsertData">
    <hive xmlns="uri:oozie:hive-action:0.4">
      <job-tracker>${jobTracker}</job-tracker>
      <name-node>${nameNode}</name-node>
      <prepare>
        <delete path="${workflowRoot}/output-data/hive"/>
        <mkdir path="${workflowRoot}/output-data"/>
      </prepare>
      <job-xml>${workflowRoot}/hive-site.xml</job-xml>
      <configuration>
        <property>
          <name>oozie.hive.defaults</name>
          <value>${workflowRoot}/hive-site.xml</value>
        </property>
      </configuration>
      <script>load_data.hql</script>
    </hive>
    <ok to="end"/>
    <error to="fail"/>
  </action>

  <kill name="fail">
    <message>Hive failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
  </kill>
  <end name="end"/>
</workflow-app>

我的job.properties文件包含 -

nameNode=hdfs://localhost:8020
jobTracker=localhost:8021
queueName=default
workflowRoot=HiveLoadData
oozie.libpath=${nameNode}/user/oozie/share/lib
oozie.wf.application.path=${nameNode}/user/${user.name}/${workflowRoot}

当我尝试使用命令“oozie job -oozie http://localhost:11000/oozie -config /user/oozie/HiveLoadData/job.properties -submit”提交作业时,我收到以下错误,

java.io.IOException: configuration is not specified
        at org.apache.oozie.cli.OozieCLI.getConfiguration(OozieCLI.java:729)
        at org.apache.oozie.cli.OozieCLI.jobCommand(OozieCLI.java:879)
        at org.apache.oozie.cli.OozieCLI.processCommand(OozieCLI.java:604)
        at org.apache.oozie.cli.OozieCLI.run(OozieCLI.java:577)
        at org.apache.oozie.cli.OozieCLI.main(OozieCLI.java:204)
configuration is not specified

4 个答案:

答案 0 :(得分:19)

您为-config参数提供的路径必须存在于本地驱动器上(而不是HDFS上)。确保/user/oozie/HiveLoadData/job.properties确实存在 - 例如ls /user/oozie/HiveLoadData/job.properties在执行oozie job -oozie...命令

的同一台机器上

答案 1 :(得分:0)

您提供给-config参数的路径必须存在于本地驱动器上(而不是HDFS上)。确保/user/oozie/HiveLoadData/job.properties确实存在-例如在执行oozie job -oozie ...命令的同一台机器上的ls /user/oozie/HiveLoadData/job.properties

答案 2 :(得分:0)

X'5000154130'

这是一种可以运行的可引导格式。

答案 3 :(得分:0)

您可以尝试使用--config参数:

$ oozie job --oozie http://node03:11000/oozie --run --config job.properties