简体   繁体   English

Oozie 的工作:纱线返回错误启动操作 [hive-4548]

[英]Oozie's job: yarn returns Error starting action [hive-4548]

There is a cluster with Cloudera including Hue. Cloudera 有一个集群,包括 Hue。 My need is the task for scheduler which send HQL-request to Hive.我需要的是调度程序的任务,它将 HQL 请求发送到 Hive。 I'm trying to do task for oozie by web-constructor integrated in Hue.我正在尝试通过集成在 Hue 中的网络构造器为 oozie 完成任务。

My HQL request's file (request.hql):我的 HQL 请求文件 (request.hql):

INSERT INTO schema_child.table_child
SELECT * from shema_parent.table_parent LIMIT 5 ;

My XML file with the execution plan (workflow.xml):我的 XML 文件与执行计划(workflow.xml):

<workflow-app name="hive-test" xmlns="uri:oozie:workflow:0.1">
    <action name="hive-test">
        <hive xmlns="uri:oozie:hive-action:0.1">
            <job-tracker>claster.site.com:8032</job-tracker>
            <name-node>hdfs://nsld3</name-node>           <script>/user/myname/oozie/hive_test/request.hql</script>
        </hive>
        <ok to="insert_into_table"/>
        <error to="kill_job"/>
    </action>
</workflow-app>

I've tried to change vars to direct link already:我已经尝试将 vars 更改为直接链接:

${jobTracker} -> claster.site.com:8032
${nameNode} -> hdfs://nsld3:8020 

But yarn returns:但是纱线返回:

2021-05-24 18:01:33,162 WARN org.apache.oozie.command.wf.ActionStartXCommand: SERVER[claster.site.com] 
USER[username] GROUP[-] TOKEN[] APP[hive-test] JOB[0000012-210501174618258-oozie-oozi-W] 
ACTION[0000012-210501174618258-oozie-oozi-W@hive-4548] Error starting action [hive-4548].
ErrorType [TRANSIENT], ErrorCode [JA009], Message [JA009: bad conf file: top-level element not ]

I'm a beginner in Hive so my work was based ondocs , some examles like this and stack's answers like this .我是 Hive 的初学者,所以我的工作是基于文档、一些类似这样的示例和类似这样的堆栈答案。
Hive version 1.1.0 Hive 版本 1.1.0
Oozie version 4.1.0 Oozie 版本 4.1.0

Questions:问题:

  1. Why my oozie job doesn't work?为什么我的 oozie 工作不起作用?
  2. How to use variables in script?如何在脚本中使用变量? Where oozie takes their meanings? oozie 的含义在哪里?

PS Sorry for my english. PS对不起我的英语。

If attached execution plan displays whole content of the workflow.xml then you need to add start, end and kill to it.如果附加的执行计划显示了工作流的全部内容。xml 那么你需要添加开始、结束和终止。 Also hive action requires <job-xml> parameter with path to a Hive settings (usually it stores at /etc/hive/conf/hive-site.xml).此外,hive 操作需要 <job-xml> 参数以及 Hive 设置的路径(通常它存储在 /etc/hive/conf/hive-site.xml 中)。

Usually variables of the script are stored in a job.properties file, so parameters like jobTraker and nameNode are usually there.通常脚本的变量存储在一个 job.properties 文件中,所以像 jobTraker 和 nameNode 这样的参数通常都在那里。 Also, you can define your own parameters in the block <parameters> in the beginning of the workflow.xml.此外,您可以在工作流开头的块 <parameters> 中定义自己的参数。xml。

Finally it should be something like that.最后应该是这样的。

<workflow-app name="hive-test-app" xmlns="uri:oozie:workflow:0.1">
    <parameters>
        <property>
            <name>jobTracker</name>
            <value>claster.site.com:8032</value>
        </property>
        <property>
            <name>nameNode</name>
            <value>hdfs://nsld3:8020</value>
        </property>
    </parameters>
    <start to="hive-test" />
    <action name="hive-test">
        <hive xmlns="uri:oozie:hive-action:0.1">
            <job-tracker>${jobTracker}</job-tracker>
            <name-node>${nameNode}</name-node>
            <job-xml>/etc/hive/conf/hive-site.xml</job-xml>   
            <script>/user/myname/oozie/hive_test/request.hql</script>
        </hive>
        <ok to="end"/>
        <error to="kill"/>
    </action>
    <end name="end"/>
    <kill name="kill"/>
</workflow-app>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM