问题描述
正在开发apache-hive-0.13.1.创建表格配置单元时,抛出如下错误
Working on apache-hive-0.13.1.while creating table hive throw an error as below
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. Cannot validate serde: com.cloudera.hive.serde.JSONSerDe
表结构为
create external table tweets(id BigInt, created_at String, scource String, favorited Boolean, retweet_count int,
retweeted_status Struct <
text:String,user:Struct<
screen_name:String, name:String>>,
entities Struct<
urls:Array<Struct<
expanded_url:String>>,
user_mentions:Array<Struct<
screen_name:String,
name:String>>,
hashtags:Array<Struct<text:String>>>,
text String,
user Struct<
screen_name:String,
name:String,
friends_count:int,
followers_count:int,
statuses_count:int,
verified:boolean,
utc_offset:int,
time_zone:String> ,
in_reply_to_screen_name String)
partitioned by (datehour int)
ROW FORMAT SERDE 'com.cloudera.hive.serde.JSONSerDe'
location '/home/edureka/sachinG'
在课堂上添加了json-serde-1.3.6-SNAPSHOT-jar-with-dependencies.jar
可以解决问题,但没有成功
Added a json-serde-1.3.6-SNAPSHOT-jar-with-dependencies.jar
in class to resolved the issue but no success
推荐答案
最后,找到了解决方案.问题出在json-serde-1.3.6-SNAPSHOT-jar-with-dependencies.jar
不同的发行版(Cloudera,Azure等)需要不同的JSON-Serde jar文件.意思是,serde jar应该与那里的发行版兼容.
Finally , got a solution for this. The issue is with json-serde-1.3.6-SNAPSHOT-jar-with-dependencies.jar
Different distribution (Cloudera, Azure, etc ) needed different JSON-Serde jar file. Means, serde jar should be compatible to there distribution.
我换了罐子,对我有用.
I changed jar and it worked for me.
这篇关于Hive在创建表“无法验证Serde:com.cloudera.hive.serde.JSONSerDe"时引发错误.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!