Hive - Elasticsearch: Cannot detect ES version


(Rob) #1

Hi
I am having issues creating an external table in Hive to connect with Elasticsearch. I am using version 1.2.1000.2.4.2. of Hive and 5.3.1 of Elasticsearch.

Below is the hive query I am running:

CREATE EXTERNAL TABLE sts_lat_lon_avg_elastic_0426
(asof_yyyymm int,
outlet_state string,
bus_in int,
lat_num decimal(9,6),
lon_num decimal(9,6),
avg_accts_per_tm decimal(12,2))
STORED BY 'org.elasticsearch.hadoop.hive.EsStorageHandler'
TBLPROPERTIES( 'es.nodes.wan.only' = 'true', 'es.resource' = 'lat_lon','es.index.auto.create' = 'false');

Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. org.elasticsearch.hadoop.EsHadoopIllegalArgumentException: Cannot detect ES version - typically this happens if the network/Elasticsearch cluster is not accessible or when targeting a WAN/Cloud instance without the proper setting 'es.nodes.wan.only'

I have confirmed that the port is open and the host is accessible by all nodes in the cluster. I have also tried specifying the hostname and port in the TBLPROPERTIES field as well as modifying the config file in ES to specify the ip address and port 9200 for the host as well.

If anyone has had similar issues or has any suggestions, I would greatly appreciate any feedback. Thanks!


(system) #2

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.