elasticsearch ESHAdoPillegalArgumentException:无法检测ES版本,elasticsearch,hive,elasticsearch,Hive" /> elasticsearch ESHAdoPillegalArgumentException:无法检测ES版本,elasticsearch,hive,elasticsearch,Hive" />

elasticsearch ESHAdoPillegalArgumentException:无法检测ES版本

elasticsearch ESHAdoPillegalArgumentException:无法检测ES版本,elasticsearch,hive,elasticsearch,Hive,以前有人问过这个问题,但我用的是蜂巢而不是火花。因此,我不太明白如何将解决方案应用于我的问题。所以我把我的问题贴出来。 我正在学习将Elasticsearch与hive连接起来,我正在使用此链接 我在服务器上安装了Elasticsearch。我启动了hive并添加了jar文件 add jar /path/elasticsearch-hadoop-6.3.2.jar; 然后我尝试使用上面链接中给出的查询创建一个表 CREATE EXTERNAL TABLE table1 (col1 int, c

以前有人问过这个问题,但我用的是蜂巢而不是火花。因此,我不太明白如何将解决方案应用于我的问题。所以我把我的问题贴出来。 我正在学习将Elasticsearch与hive连接起来,我正在使用此链接

我在服务器上安装了Elasticsearch。我启动了hive并添加了jar文件

add jar /path/elasticsearch-hadoop-6.3.2.jar;
然后我尝试使用上面链接中给出的查询创建一个表

CREATE EXTERNAL TABLE table1 (col1 int, col2 string) STORED BY 'org.elasticsearch.hadoop.hive.EsStorageHandler' TBLPROPERTIES('es.resource' = 'warehouse/table1','es.index.auto.create' = 'false');
就在那时我犯了这个错误

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'
我试着设置es.nodes.wan.only'='true',但没有效果。
进一步搜索显示,执行者可能无法连接到Elasticsearch,我需要更改网络配置。但是我该怎么做呢?我不熟悉Elasticsearch。请提供帮助。

您需要在TBLProperty中设置
es.nodes
,否则Hive如何猜测es群集的IP?谢谢。成功了。我不明白他们为什么不在链接中给出它。