Created 09-01-2016 08:33 PM
Sure this is a cool one:
First you have to download the JAR FILES required for Elastic
next, you can create a Hive table that uses Elastic Index as a storage as follows:
add jar /usr/hdp/184.108.40.206-2950/hive/lib/commons-httpclient-3.0.1.jar; //try to look for the add jar /usr/hdp/jars/elasticsearch-hadoop-hive-2.2.0-beta1.jar; drop table traffic_view_elastic; create external table traffic_view_elastic( time timestamp, id int, name string ) STORED BY 'org.elasticsearch.hadoop.hive.EsStorageHandler' TBLPROPERTIES('es.resource' = 'hive/myUseCase', 'es.index.auto.create' = 'true', 'es.nodes' = 'elasticnode-hostname-or-ip-address');
once this is done, you can go to Elastic and check out the newly created index (After the data been insterted into this table).
Hope this works for you, appreciate if you mark this as an accepted answer if it does.