Search code examples
hadoophivehuecloudera-cdh

serdes jar don't work


I'm sing cdh5 quickstart... I would like to run this script:

CREATE EXTERNAL TABLE serd(
user_id string,
type string,
title string,
year string,
publisher string,
authors struct<name:string>,
source string)

   ROW FORMAT SERDE 'org.openx.data.jsonserde.JsonSerDe'
   STORED AS  TEXTFILE;

   LOAD DATA LOCAL INPATH '/user/hdfs/data/book-seded-workings-reduced.json/' INTO TABLE serd;

But I got this error:

Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. Could not initialize class org.openx.data.jsonserde.objectinspector.JsonObjectInspectorFactory

But following my previous question(Loading JSON file with serde in Cloudera) , I've tried to build each serd proposed here: https://github.com/rcongiu/Hive-JSON-Serde But I always have the same error


Solution

  • Finally, only twitter serde worked in my cdh5 vm