如何在直线 SparkSQL 中为 ElasticSearch 创建临时表 ElasticSearch 是 HAProxy 的幕后推手

问题描述

如何通过HAPROXY将beeline连接到elasticsearch。

CREATE TEMPORARY TABLE temp_table USING org.elasticsearch.spark.sql OPTIONS (resource 'temp_index/_doc',nodes 'preview.abc.com',mapping.date.rich 'false',nodes.path.prefix '/es_cluster_path/',net.http.header.Authorization 'Basic 123absfwoein*****');

我收到以下错误

Error: 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)

但以下有效

curl --location --request GET 'https://preview.abc.com/es_cluster_path/' --header 'Authorization: Basic 123absfwoein*****'
{
name: "master-node",cluster_name: "test_cluster",cluster_uuid: "xGV5******ikHihaNeHg",version: {
number: "7.6.1",build_flavor: "default",build_type: "deb",build_hash: "aa7*********e8570670309b1f12348f023b",build_date: "2020-02-29T00:15:25.529771Z",build_snapshot: false,lucene_version: "8.4.0",minimum_wire_compatibility_version: "6.8.0",minimum_index_compatibility_version: "6.0.0-beta1"
},tagline: "You KNow,for Search"
}

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...