Error while creating external table in Hive using EsStorageHandler
Finally found the resolution for it...
1) The "elasticsearch-hadoop-1.2.0.jar" jar I was using was bugged one. It didn't have any hadoop/hive packages inside it. (Found this jar on internet and just downloaded it).
Now replaced it by jar from Maven repository "elasticsearch-hadoop-1.3.0.M1.jar".
2) The class "org.elasticsearch.hadoop.hive.**EsStorageHandler**"
has been renamed in new elasticsearch jar as "org.elasticsearch.hadoop.hive.**ESStorageHandler**"
. Note that capital 'S' in 'ES'.
So the new hive command to create External table
is :
CREATE EXTERNAL TABLE drivers_external ( id BIGINT, firstname STRING, lastname STRING, vehicle STRING, speed STRING) STORED BY 'org.elasticsearch.hadoop.hive.ESStorageHandler'TBLPROPERTIES('es.nodes'='localhost','es.resource' = 'drivers/driver');
It Worked!