rcongiu / Hive-JSON-Serde

Read - Write JSON SerDe for Apache Hive.
Other
733 stars 393 forks source link

org.apache.hadoop.hive.ql.exec.DDLTask. Cannot validate serde: org.openx.data.jsonserde.JsonSerDe #123

Closed pmgriffin closed 8 years ago

pmgriffin commented 8 years ago

Hi there,

i'm hoping you'll be able to assist me please, i'm running HortonWorks HDP sandbox v2.3, have built your Serde using "mvn -Phdp23 clean package" and added the resulting JAR file on Hive shell as follows:

hive> add JAR /home/trustev/json-serde-1.3.7-SNAPSHOT-jar-with-dependencies.jar

; Added [/home/trustev/json-serde-1.3.7-SNAPSHOT-jar-with-dependencies.jar] to class path Added resources: [/home/trustev/json-serde-1.3.7-SNAPSHOT-jar-with-dependencies.jar] hive>

My table definition is as follows:

CREATE EXTERNAL TABLE TestWithSerde( key string, myObj "my schema hidden for confidentiality" ) ROW FORMAT SERDE 'org.openx.data.jsonserde.JsonSerDe'; STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler' WITH SERDEPROPERTIES ( "mapping.ts" = "timestamp" ) WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,object:myval") TBLPROPERTIES ('hbase.table.name' = 'Tbl_XXXX');

Any help is greatly appreaciated.

Note i restarted ambari in an attempt to ensure the jar was loaded but it did not resolve the issue.

I built the Serde on windows and then deployed to CentOS 7 box ... would that have anything to do with it maybe?

rcongiu commented 8 years ago

You'd have to look at the logs, without it, you'd just be guesssing at the reason... one reason could be that you compiled using Java 8 in windows but your system has java 7, which will refuse tur un java8 code. But I am just guessing.

Also, another thing that could be different from windows to unix is filename case, which you should double check on the add Serde statement.

rcongiu commented 8 years ago

Closing since it's not an issue.