【发布时间】:2015-03-05 17:58:26
【问题描述】:
我正在尝试在 Hue 中使用 Oozie 的 Hive 动作。我的 Hive 脚本非常简单:
create table test.test_2 as
select * from test.test
这个 Oozie 动作只有 3 个步骤:
- 开始
- hive_query
- 结束
我的工作.properties:
jobTracker worker-1:8032
mapreduce.job.user.name hue
nameNode hdfs://batchlayer
oozie.use.system.libpath true
oozie.wf.application.path hdfs://batchlayer/user/hue/oozie/workspaces/_hue_-oozie-4-1425575226.04
user.name hue
我将 hive-site.xml 添加了两次 - 作为文件和 job.xml。 Oozie 动作开始,第二步停止。作业被“接受”。但是在色调控制台中我有一个错误:
variable[user] cannot ber resolved
我正在使用 Apache Oozie 4.2、Apache Hive 0.14 和 Hue 3.7(来自 Github)。
更新:
这是我的工作流.xml:
bash-4.1$ bin/hdfs dfs -cat /user/hue/oozie/workspaces/*.04/work*
<workflow-app name="ccc" xmlns="uri:oozie:workflow:0.4">
<start to="ccc"/>
<action name="ccc">
<hive xmlns="uri:oozie:hive-action:0.2">
<job-tracker>${jobTracker}</job-tracker>
<name-node>${nameNode}</name-node>
<job-xml>/user/hue/hive-site.xml</job-xml>
<script>/user/hue/hive_test.hql</script>
<file>/user/hue/hive-site.xml#hive-site.xml</file>
</hive>
<ok to="end"/>
<error to="kill"/>
</action>
<kill name="kill">
<message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
</kill>
<end name="end"/>
</workflow-app>
【问题讨论】:
-
在生成的 XML 中,您是否看到任何“用户”变量?
-
不,我没有任何变量,
-
“变量 [用户] 无法解析”可能是误导性错误消息。对我们来说,通过重新启动工作流程,一切都很顺利。有一个相关的 jira 票证 (OOZIE-1580),但已在 4.1.0 版中修复