site=true
jvm=false
Thanks, you are correct, Fixed the issue by making the below change on plugin-descriptor.properties
site=true
jvm=false
And by placing the ELS Hadoop jar below elasticsearch-hadoop-2.1.1/_site. ELS is starting without any error.
Now I have INDEXED some document on ELS and created the external table on hive. While doing a query and getting the blow error.
hive> select * from foo_analysis_doc_ids;
OK
Failed with exception java.io.IOException:java.lang.StringIndexOutOfBoundsException: String index out of range: -1
Below are the actions performed.
"analysis" : {
"properties" : {
"analyserVersion" : {
"type" : "string",
"store" : "true",
"index" : "not_analyzed"
},
"analysisTime" : {
"type" : "date",
"format" : "date_optional_time"
},
"documentIdentifier" : {
"type" : "string",
"store" : true,
"index" : "not_analyzed"
},
"topics" : {
"type" : "string"
}
}
}
}'
curl -v -XPOST 'http://x.x.x.x:9200/_bulk' -d '{ "create": { "_index": "idx_foo", "_type": "analysis" } }
{ "analyserVersion": "0.0.1", "analysisTime": "2015-03-07T16:12:00Z", "documentIdentifier": "doc1", "topics": ["business", "collaboration", "lifehacks", "email"] }
{ "create": { "_index": "idx_foo", "_type": "analysis" } }
{ "analyserVersion": "0.0.1", "analysisTime": "2015-03-07T16:12:01Z", "documentIdentifier": "doc2", "topics": ["sports", "basketball"] }
{ "create": { "_index": "idx_foo", "_type": "analysis" } }
{ "analyserVersion": "0.0.1", "analysisTime": "2015-03-07T16:12:02Z", "documentIdentifier": "doc3", "topics": ["lifehacks", "wardrobe"] }
{ "create": { "_index": "idx_foo", "_type": "analysis" } }
{ "analyserVersion": "0.0.1", "analysisTime": "2015-03-07T16:12:03Z", "documentIdentifier": "doc4", "topics": ["sports", "snowboarding", "mountains"] }
{ "create": { "_index": "idx_foo", "_type": "analysis" } }
{ "analyserVersion": "0.0.1", "analysisTime": "2015-03-07T16:12:04Z", "documentIdentifier": "doc5", "topics": ["outdoors", "hiking", "mountains", "lakes"] }
{ "create": { "_index": "idx_foo", "_type": "analysis" } }
{ "analyserVersion": "0.0.1", "analysisTime": "2015-03-07T16:12:05Z", "documentIdentifier": "doc6", "topics": ["business", "sales", "cars"] }
{ "create": { "_index": "idx_foo", "_type": "analysis" } }
{ "analyserVersion": "0.0.1", "analysisTime": "2015-03-07T16:12:06Z", "documentIdentifier": "doc7", "topics": ["jeep", "cars", "outdoors", "off-roading"] }
{ "create": { "_index": "idx_foo", "_type": "analysis" } }
{ "analyserVersion": "0.0.1", "analysisTime": "2015-03-07T16:12:07Z", "documentIdentifier": "doc8", "topics": ["sports", "fly fishing", "lakes"] }
{ "create": { "_index": "idx_foo", "_type": "analysis" } }
{ "analyserVersion": "0.0.1", "analysisTime": "2015-03-07T16:12:08Z", "documentIdentifier": "doc9", "topics": ["programming", "clojure", "databases"] }'
CREATE DATABASE es_test;
USE es_test;
CREATE EXTERNAL TABLE foo_analysis_doc_ids (
analyser_version STRING,
analysis_time TIMESTAMP,
doc_id STRING,
topics ARRAY
)
STORED BY 'org.elasticsearch.hadoop.hive.EsStorageHandler'
TBLPROPERTIES('es.resource' = 'idx_foo/analysis',
'es.mapping.names' = 'doc_id:documentIdentifier, analysis_time:analysisTime, analyser_version:analyserVersion');