Getting Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. Cannot validate serde: org.apache.hadoop.hive.contrib.serde2.MultiDelimitSerDe
while creating table on Hive. Below is the table creation script :
CREATE EXTERNAL TABlE ratings(user_id INT, movie_id INT,rating INT,rating_time String)
ROW FORMAT SERDE 'org.apache.hadoop.hive.contrib.serde2.MultiDelimitSerDe'
WITH SERDEPROPERTIES ("field.delim"="::")
LOCATION '/user/hive/ratings';
HDP Version : 2.1.1
You are facing this problem because your hive lib does not have hive-contrib jar or hive-site.xml is not pointing to it.
Check '/usr/lib/hive/lib'
folders . There must be a jar hive-contrib-<version>.jar
in this folder
If you do not find any jar in that folder download it from this link
Please take care of the correct version.
Now put that file to your hive lib folder mentioned above. you can add this file to your hive CLI in two ways
- for single Session :
add jar /usr/lib/hive/lib/hive-contrib-<version>.jar;
For permanent solution : Add this to your hive-site.xml
<property> <name>hive.aux.jars.path</name> <value>/usr/lib/hive/lib/*</value> </property>
P.S: MultiDelimitSerDe class is added after hive-contrib-0.13.Please ensure that you are using correct version
来源:https://stackoverflow.com/questions/45316888/cannot-validate-serde-org-apache-hadoop-hive-contrib-serde2-multidelimitserde