Continuing the discussion from ElasticSearch 2.1.2 JAR for Hadoop Integration is not working:
CREATE EXTERNAL TABLE TestTable(key STRING,msgtype STRING,app_log_ts STRING) STORED BY 'org.elasticsearch.hadoop.hive.EsStorageHandler'
TBLPROPERTIES('es.resource' = 'logstash-*/log', 'es.nodes' = 'es.host', 'es.port' = '9200','es.mapping.names' = 'key:CLIENT_ORDER_ID,msgtype:MESSAGE_TYPE,app_log_ts:APP_TIME');
Whilke executing select I see exception :
select * from TestTable;
Failed with exception java.io.IOException:java.lang.ClassCastException: org.elasticsearch.hadoop.mr.WritableArrayWritable cannot be cast to org.apache.hadoop.io.Text
NOTE : Its Prints first few the rows, then throws the exception and exit.
I See ES has text for the all the field.
jar :
elasticsearch-hadoop-2.2.0-m1.jar