Cloudera Hive - Google Cloud Elasticsearch Instance

Hi,

I am using cloudera vm instance to load data into elasticsearch.
The hive is from clourdera vm instance and elasticsearch is installed in an google cloud vm instance. The same setup was working about a month ago and doesn't now.

HIVE:
create external table esl_sales_distinct(name STRING, state STRING, country STRING, zip INT, territory STRING, amt_aug2018aug2019 FLOAT, amt_jan2019july2019 FLOAT, amt_2018 FLOAT, company STRING, status STRING, location STRING) stored by 'org.elasticsearch.hadoop.hive.EsStorageHandler' tblproperties ('es.resource'='sales_distinct/_doc', 'es.index.auto.create'='true', 'es.nodes'='x.x.x.x.', 'es.port'='9200', 'es.net.http.auth.user'='elastic', 'es.net.http.auth.pass'='elastic', 'es.nodes.wan.only'='true');

the above fails: 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'

whereas the curl command works absolutely fine:
curl -u elastic:elastic -H "Content-Type: application/json" -XPUT 'http://x.x.x.x:9200/sales_distinct' -d '
{
"settings" : {
"number_of_shards" : 1,
"number_of_replicas" : 0
},
"mappings" : {
"properties" : {
"location" : {
"type" : "geo_point"
}
}
}
}'

Output: {"acknowledged":true,"shards_acknowledged":true,"index":"sales_distinct"}

Am I missing any TBLPROPERTIES? I mostly believe its the TBLPROPERTIES

Thanks.

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