Hivesever unable to load EsStorageHandler class from elasticsearch-hadoop

I am using apache hadoop-2.2.0 and hive-0.12.0
I have installed Elasticsearch 1.5.2

I have this configuration in hive-site.xml

hive.aux.jars.path /pathTo/elasticsearch-hadoop-2.0.1.jar

When i create table in hive

CREATE EXTERNAL TABLE artists (id int,name string,links string)
STORED BY 'org.elasticsearch.hadoop.hive.EsStorageHandler'
TBLPROPERTIES('es.resource' = 'radio/artists')

Throws exception:-
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. org.apache.hadoop.hive.ql.metadata.HiveException: Error in loading storage handler.org.elasticsearch.hadoop.hive.EsStorageHandler

What am I missing? Thanks in advance!

I figured it out.
I haven't kept the file(elasticsearch-hadoop-2.0.1.jar) in $HIVE_HOME/lib folder .

1 Like

Make sure to use only one version of the jar (2.0.2 vs 2.0.1). And if possible, upgrade to 2.1.0.Beta4 - while marked as a Beta, contains plenty of fixes.