Oozie工作流程:未找到Hive表,但它确实存在 [英] Oozie workflow: Hive table not found but it does exist

查看:772
本文介绍了Oozie工作流程:未找到Hive表,但它确实存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个oozie工作流程,运行在一台由4台机器组成的CDH4集群上(一台主机一台,三台哑巴工人)。配置单元Metastore使用mysql(驱动程序存在)在主服务器上运行,oozie服务器也使用mysql在主服务器上运行。使用Web界面,我可以按预期方式导入和查询配置单元,但是当我在oozie工作流程中执行相同的查询时,它会失败。即使添加IF EXISTS也会导致下面的错误。我尝试将连接信息作为属性添加到配置单元作业中,但没有取得任何成功。



任何人都可以给我一个提示吗?我错过了什么吗?需要进一步的信息吗?



这是工作日志的输出:

 脚本[drop.sql]内容:
------------------------
DROP TABLE IF EXISTS performance_log;

------------------------

Hive命令参数:
-f
drop.sql

=================================== ==============================

>>>现在调用Hive命令行>>>

拦截System.exit(10001)

<<< <主类的调用已完成<<<

失败的Oozie启动器,Main类[org.apache.oozie.action.hadoop.HiveMain],退出代码[10001]

Oozie启动器失败,正常完成Hadoop作业

这是错误信息:

 失败:SemanticException [错误10001]:找不到表格performance_log 
拦截System.exit(10001)
失败的Oozie启动器,主类[org.apache.oozie.action .hadoop.HiveMain],退出代码[10001]


解决方案

问题是其他节点不知道你的MYSQL在哪里,所以你没有找到错误表。



你需要做2件事


  1. 复制oozie工作流目录中的hive-site.xml

  2. 在您的Hive操作中告诉oozie使用我的hive-site .xml

类似于下面的内容

action NAME = 蜂巢节点 >
< hive xmlns =uri:oozie:hive-action:0.2>
< job-tracker> $ {jobTracker}< / job-tracker>
< name-node> $ {nameNode}< / name-node>
< job-xml> hive-site.xml< / job-xml>



这应该是有效的。



谢谢

I got a oozie workflow, running on a CDH4 cluster of 4 machines (one master-for-everything, three "dumb" workers). The hive metastore runs on the master using mysql (driver is present), the oozie server also runs on the master using mysql, too. Using the web interface I can import and query hive as expected, but when I do the same queries within an oozie workflow it fails. Even the addition of the "IF EXISTS" leads to the error below. I tried to add the connection information as properties to the hive job without any success.

Can anybody give me a hint? Did I miss anything? Any further information needed?

This is the output of the job's log:

  Script [drop.sql] content:
  ------------------------
  DROP TABLE IF EXISTS performance_log;

  ------------------------

  Hive command arguments :
  -f
  drop.sql

  =================================================================

  >>> Invoking Hive command line now >>>

  Intercepting System.exit(10001)

  <<< Invocation of Main class completed <<<

  Failing Oozie Launcher, Main class [org.apache.oozie.action.hadoop.HiveMain], exit code [10001]

  Oozie Launcher failed, finishing Hadoop job gracefully

And this is the error message:

  FAILED: SemanticException [Error 10001]: Table not found performance_log
  Intercepting System.exit(10001)
  Failing Oozie Launcher, Main class [org.apache.oozie.action.hadoop.HiveMain], exit code [10001]

解决方案

The problem is other nodes don't know where your MYSQL is , so you are getting error table not found.

You need to do 2 things

  1. Copy hive-site.xml in the oozie workflow directory
  2. In your Hive action tell oozie that use my hive-site.xml

Something like below

action name="hive-node"> <hive xmlns="uri:oozie:hive-action:0.2"> <job-tracker>${jobTracker}</job-tracker> <name-node>${nameNode}</name-node> <job-xml>hive-site.xml</job-xml>

This should work.

Thanks

这篇关于Oozie工作流程:未找到Hive表,但它确实存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆