How Hive connect to Elasticsearch when X-Pack installed

Before i install the X-Pack,I execute the following in the Hive:

CREATE EXTERNAL TABLE T_TEMP_SALES_INFO(id string,loan_no string,str_no string) STORED BY 'org.elasticsearch.hadoop.hive.EsStorageHandler' TBLPROPERTIES('es.nodes' = ',,,,','es.resource'='temp_sales_info/type',''='true','pushdown'='true','es.mapping.names'='id:_metadata._id,loan_no:loan_no,str_no:str_no');

The SQL will be OK.But After I install X-Pack,the SQL will report the error:

Error: org.apache.spark.sql.execution.QueryExecutionException: 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' (state=,code=0)

I want to know how to solve this!!!

Have you configured security for ES-Hadoop?

When you install X-Pack for Elasticsearch, it automatically enables user authentication for all connections. You need to instruct Hadoop/Hive to send a username/password (or PKI certificates) when connecting to ES.

I just specify 'es.username' and 'es.password',however,it report the same error.

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