Oozie shell 操作失败

Oozie shell action failing

我正在尝试在我的 cloudera 虚拟机(快速启动虚拟机)中测试 oozie shell 操作。当 运行 一个简单的 hdfs 命令(hadoop fs -put ...)脚本工作时,但是当我触发配置单元脚本时,oozie 作业已完成,状态为 "KILLED".在 oozie consol 上,我收到的唯一错误消息是

"Main class [org.apache.oozie.action.hadoop.ShellMain], exit code [1]"

虽然历史服务器中的基础作业(名称节点日志)正在成功。以下是 oozie 的工作详情:

workflow.xml
<workflow-app xmlns="uri:oozie:workflow:0.5" name="WorkFlow1">
      <start to="shell-node" />
          <action name="shell-node">
        <shell xmlns="uri:oozie:shell-action:0.2">
            <job-tracker>${jobTracker}</job-tracker>
            <name-node>${nameNode}</name-node>
            <configuration>
                <property>
                    <name>mapred.job.queue.name</name>
                    <value>${queueName}</value>
                </property>
            </configuration>
            <exec>${myscript}</exec>
            <file>${myscriptpath}#${myscript}</file>
            <capture-output/>
        </shell>
        <ok to="end"/>
        <error to="fail"/>
    </action>
        <kill name="fail">
          <message>Workflow failed, error
            message[${wf:errorMessage(wf:lastErrorNode())}] </message>
        </kill>
        <end name="end" />
</workflow-app>
------------------------------------
job.properties
nameNode=hdfs://quickstart.cloudera:8020
jobTracker=hdfs://quickstart.cloudera:8032
queueName=default
myscript=test.sh
myscriptpath=${nameNode}/oozie/sl/test.sh
oozie.use.system.libpath=true
oozie.wf.application.path=${nameNode}/oozie/sl/
workflowAppUri=${nameNode}/oozie/sl/
-----------------------------------------------
test.sh
hive -e "create table test2 as select * from test"

如果有人能指出我弄错的方向,我将不胜感激。

如果您了解一下 Oozie Hive 操作,那就太好了。

配置非常简单。 Hive 操作将负责设置所有内容。

https://oozie.apache.org/docs/4.3.0/DG_HiveActionExtension.html

要连接 hive,您需要显式添加 hive-site.xml 或 Hive 服务器详细信息才能连接。