user2986668
user2986668

Reputation: 33

running presto-cli warnning:SerDe org.apache.hadoop.hive.contrib.serde2.RegexSerDe does not exist

Deploy the presto on single node . when running Presto-cli ,i got following errors:

presto:default> select * from test1;
Query 20131116_233859_00005_5a2yh failed: MetaException(message:org.apache.hadoop.hive.serde2.SerDeException SerDe org.apache.hadoop.hive.contrib.serde2.RegexSerDe does not exist)

hive is Operating normally. why prestodb was failed? my profile:

export JAVA_HOME=/usr/java
export JRE_HOME=/usr/java/jre
export HADOOP_HOME=/usr/hadoop
export HIVE_HOME=/usr/hive
export PRESTO_HOME=/usr/presto
export CLASSPATH=:.:$CLASSPATH:$JAVA_HOME/lib:$JRE_HOME:`find /usr/hadoop -name '*.jar' | grep -v 'test' | grep -v 'example' | perl -e '@jars=<STDIN>;chomp @jars; print join(":",@jars);'`:$PRESTO_HOME/lib:$HADOOP/lib:$HIVE_HOME/lib
export PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin:$HADOOP_HOME/bin:$HADOOP_HOME/sbin:$PRESTO_HOME/bin:$HIVE_HOME/bin
export HADOOP_HEAPSIZE=4096

I got it,when the table of hive was created by RegEx, the presto-cli running failed. I had no idea. somebody help me please!

Upvotes: 1

Views: 2267

Answers (3)

Sree Eedupuganti
Sree Eedupuganti

Reputation: 440

Followed the same process as you mentioned above getting same error any suggestions please.

Query failed: org/apache/hadoop/hive/serde2/SerDe

Using hive-hadoop2 version placed the serde jar in the following path

presto/plugin/hive-hadoop2/hive-serde-1.0.0.jar and restarted presto.

Upvotes: 1

jc mannem
jc mannem

Reputation: 2343

On Master node:

  1. Place your RegexSerDe.jar into hive connectors plugin directory related to your hadoop distribution. (Ex: for hadoop2 distribution you may place JAR file to ../presto/plugin/hive-hadoop2/)

  2. Make sure the RegexSerDe.jar file has correct ownership as other jar files present in this directory.

  3. Restart the presto-server process. (sudo service presto-server restart). If this do not work, you may need to restart with launcher sudo /usr/lib/presto/bin/launcher restart

Repeat this on all slave nodes !

Upvotes: 3

Pradatta
Pradatta

Reputation: 3370

You have to put the SerDe jar inside the plugin directory (plugin/hive-cdh4). I didn't use RegexSerDe but it worked for CSVSerDe.

Upvotes: 0

Related Questions