- First i did create contact/contact index and type in ElasticSearch and i did insert 4 records in it like this
- Next i did download ElasticSearch Hadoop zip file on my Hadoop VM by executing following command
I did expand the elasticsearch-hadoop-2.0.0.RC1.zip in the /root directorywget http://download.elasticsearch.org/hadoop/elasticsearch-hadoop-2.0.0.RC1.zip
- Next i had to start the hive console by executing following command, take a look at how i had to add elasticsearch-hadoop-2.0.0.RC1.jar to the aux.jars.path
hive -hiveconf hive.aux.jars.path=/root/elasticsearch-hadoop-2.0.0.RC1/dist/elasticsearch-hadoop-2.0.0.RC1.jar
-
Next i did define artists table in hive that points to contact index in the elasticsearch server like this
CREATE EXTERNAL TABLE artists ( fname STRING, lname STRING, email STRING) STORED BY 'org.elasticsearch.hadoop.hive.EsStorageHandler' TBLPROPERTIES('es.resource' = 'contact/contact', 'es.index.auto.create' = 'false') ;
- Once the table is configured i could query it like any normal Hive table like this
Using elasticsearch as external data store with apache hive
ElasticSearch has this feature in which you can configure Hive table that actually points to index in ElasticSearch. I wanted to learn how to use this feature so i followed these steps
Subscribe to:
Post Comments (Atom)
8 comments:
Many thanks Sunil for this very clear & helpful post.
Hi,
This post is excellent and working for me.
Can you please guide me, how to store data into ElasticSearch using Hive.
It was a very very helpful tutorial. thanks a lot
We are leading responsive website designing and development company in Noida.
We are offering mobile friendly responsive website designing, website development, e-commerce website, seo service and sem services in Noida.
Responsive Website Designing Company in Noida
Website Designing Company in Noida
SEO Services in Noida
SMO Services in Noida
Battery Mantra is Authorized exide car battery dealer in Noida and Greater Noida. We are providing our service in Indirapuram, Delhi, Ashok Nagar.
Exide Battery Dealer in Noida
Battery Dealer in Noida
Authorized Battery Dealer in Noida
Car Battery Dealer in Noida
Car Battery Dealer
Exide Battery Dealer
Egmedi.com is online medical store pharmacy in laxmi nagar Delhi. You can Order prescription/OTC medicines online. Cash on Delivery available. Free Home Delivery
Online Pharmacy in Delhi
Buy Online medicine in Delhi
Online Pharmacy in laxmi nagar
Buy Online medicine in laxmi nagar
Onine Medical Store in Delhi
Online Medical store in laxmi nagar
Online medicine store in delhi
online medicine store in laxmi nagar
Purchase Medicine Online
Online Pharmacy India
Online Medical Store
Thanks for info....
Website development in Bangalore
Thanks for info
Web Design Company in Bangalore
Post a Comment