1

I am following https://gist.github.com/costin/8025827 example not sure why am getting this error. Any response is highly appreciated.

hive> ADD JAR hdfs:///auxlib/elasticsearch-hadoop-2.2.0.jar ;
converting to localhdfs:///auxlib/elasticsearch-hadoop-2.2.0.jar
Added [/private/tmp/hive/elasticsearch-hadoop-2.2.0.jar] to class path
Added resources: [hdfs:///auxlib/elasticsearch-hadoop-2.2.0.jar]

hive> list jars;
/private/tmp/hive/elasticsearch-hadoop-2.2.0.jar

hive> CREATE EXTERNAL TABLE eslogs (time STRING, extension STRING,clientip STRING, request STRING, response INT, agent STRING) STORED BY 'org.elasticsearch.hadoop.hive.ESStorageHandler' TBLPROPERTIES('es.resource' = 'hive', 'es.mapping.names' = 'time:@timestamp');

FAILED: SemanticException Cannot find class 'org.elasticsearch.hadoop.hive.ESStorageHandler'

René Vogt
  • 43,056
  • 14
  • 77
  • 99
  • as @Ham Charef has suggested it is required to add the hadoop jar and the hadoop-hive jar since the class `org.elasticsearch.hadoop.hive.ESStorageHandler` is in the later – pleonasmik Feb 17 '17 at 13:26

1 Answers1

1

I solved the problem after adding elasticsearch-hadoop-2.3.0.jar and elasticsearch-hadoop-hive-2.3.0.jar files in $HIVE_HOME/lib folder.

Hope it work with you..

Hamdi Charef
  • 639
  • 2
  • 12
  • 19