简体   繁体   English

Oozie Hive动作在SerDe上失败

[英]Oozie Hive Action Failed on SerDe

I get an error from oozie hive action workflow : 我从oozie hive动作工作流程中收到一个错误:

Failing Oozie Launcher, Main class [org.apache.oozie.action.hadoop.HiveMain], 
      main() threw exception, org/apache/hadoop/hive/serde2/SerDe
      java.lang.NoClassDefFoundError: org/apache/hadoop/hive/serde2/SerDe

I'm using CDH4.2, HUE 2.2 and JSON-SerDe ( rcongiu-hive-json-serde ) for my hive table SerDe. 我将蜂巢表SerDe使用CDH4.2,HUE 2.2和JSON-SerDe( rcongiu-hive-json-serde )。

The Hive query script is no problem, I had successfull running it in hive console. Hive查询脚本没有问题,我已经在Hive控制台中成功运行了它。 I already set the oozie share lib. 我已经设置了oozie share lib。 What make me strongly confuse, I get no error while submit the hive workflow with default table (not using special SerDe) but when I change to my JSON-SerDe table it always failed. 是什么让我非常困惑,在使用默认表提交配置单元工作流程时(没有使用特殊的SerDe),我没有遇到任何错误,但是当我更改为JSON-SerDe表时,它总是失败。 the ADD JAR /path-to/serde.jar doesn't work either. ADD JAR /path-to/serde.jar也不起作用。

I solved this error by placing my Serde JAR file in lib path of application. 我通过将Serde JAR文件放在应用程序的lib路径中解决了此错误。

Below is my HDFS directory structure: 以下是我的HDFS目录结构:

/user/manoj/app/workflow.xml
/user/manoj/app/lib/json-serde-1.3-jar-with-dependencies.jar

PS: you may have any version of serDe JAR, I used json-serde-1.3-jar-with-dependencies.jar specifically because I found in other answer that this version supports deserialization as well and it worked for me. PS:您可能有任何版本的serDe JAR,我使用了json-serde-1.3-jar-with-dependencies.jar尤其是因为我在其他答案中发现该版本也支持反序列化并且对我json-serde-1.3-jar-with-dependencies.jar I was facing "cannot deserialize" error with hive-serde.jar. 我在hive-serde.jar中遇到“无法反序列化”错误。

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

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