beeline建表出现FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. Cannot validate serde: org.openx.data.jsonserde.JsonSerDe (state=08S01,code=1)

beeline通过hive连接mysql,建表的错误

1. 终端输入

beeline -u jdbc:hive2://sam02:10000 -n root

2. 输入以下建表语句

CREATE EXTERNAL TABLE if not exists news (
    project string,
    ctime string,
    content struct<distinct_id:string,event:string,properties:struct<model:string,network_type:string,is_charging:string,app_version:string,element_name:string,element_page:string,carrier:string,os:string,imei:string,battery_level:string,screen_width:string,screen_height:string,device_id:string,client_time:string,ip:string,manufacturer:string>>
)
PARTITIONED BY(logday string)
ROW FORMAT SERDE 'org.openx.data.jsonserde.JsonSerDe'
LOCATION '/sources/news/';

3. 出错结果

Error: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. Cannot validate serde: org.openx.data.jsonserde.JsonSerDe (state=08S01,code=1)

4. 解决方法

4.1终端输入

beeline -u jdbc:hive2://sam02:10000 -n root -i ~/.hiverc
posted @ 2022-03-10 16:27  递茶大户  阅读(409)  评论(0编辑  收藏  举报