hadoop - Error while creating external table in Hive using EsStorageHandler -


i facing error while creating external table push data hive elasticsearch.

what have done far:

1) set elasticsearch-1.4.4 , running.

2) set hadoop1.2.1, daemons , running.

3) set hive-0.10.0.

4) configured elasticsearch-hadoop-1.2.0.jar in both hadoop/lib , hive/lib well.

5) created few internal tables in hive.

error coming when executing following command:

create external table drivers_external (     id bigint,      firstname string,      lastname string,      vehicle string,      speed string)  stored 'org.elasticsearch.hadoop.hive.esstoragehandler'                     tblproperties('es.nodes'='localhost','es.resource' = 'drivers/driver'); 

error is:

failed exception org.apache.hadoop.hive.ql.metadata.hiveexception: error in loading storage handler.org.elasticsearch.hadoop.hive.esstoragehandler failed: execution error, return code 1 org.apache.hadoop.hive.ql.exec.ddltask

any help!

finally found resolution it...

1) "elasticsearch-hadoop-1.2.0.jar" jar using bugged one. didn't have hadoop/hive packages inside it. (found jar on internet , downloaded it).

now replaced jar maven repository "elasticsearch-hadoop-1.3.0.m1.jar".

2) class "org.elasticsearch.hadoop.hive.**esstoragehandler**" has been renamed in new elasticsearch jar "org.elasticsearch.hadoop.hive.**esstoragehandler**". note capital 's' in 'es'.

so new hive command create external table :

create external table drivers_external (        id bigint,         firstname string,         lastname string,         vehicle string,         speed string)  stored 'org.elasticsearch.hadoop.hive.esstoragehandler' tblproperties('es.nodes'='localhost','es.resource' = 'drivers/driver'); 

it worked!


Comments