-
Notifications
You must be signed in to change notification settings - Fork 998
Closed
Description
What kind an issue is this?
- Bug report. If you’ve found a bug, please provide a code snippet or test to reproduce it below.
The easier it is to track down the bug, the faster it is solved. - Feature Request. Start by telling us what problem you’re trying to solve.
Often a solution already exists! Don’t send pull requests to implement new features without
first getting our support. Sometimes we leave features out on purpose to keep the project small.
Issue description
Due to CVE-2023-46674
, we need to update version to Elasticsearch-hadoop >= 7.17.11 or >= 8.9.0. So we plan to update to 7.17.11
.
According to https://github.com/elastic/elasticsearch-hadoop quote ES-Hadoop 6.x and higher are compatible with Elasticsearch 1.X, 2.X, 5.X, and 6.X
, so ES-Hadoop 7.x and higher are compatible with Elasticsearch 1.X, 2.X, 5.X, 6.X and 7.X
.
But when we replace elasticsearch-hadoop-5.5.3.jar
to elasticsearch-hadoop-7.17.11.jar
, it fails.
Steps to reproduce
Code:
-- add jar hdfs:///lib/jdbc/elasticsearch-hadoop-5.5.3.jar;
add jar hdfs:///lib/jdbc/elasticsearch-hadoop-7.17.11.jar;
create table default.tmp_es (
id bigint,
name string,
update_time timestamp
)
stored by 'org.elasticsearch.hadoop.hive.EsStorageHandler'
tblproperties (
"es.nodes"="172.26.1.1:9200",
"es.net.http.header.Authorization"="Basic xxx",
"es.nodes.wan.only"="true",
"es.nodes.discovery"="false",
"es.http.retries"="10",
-- index/type
"es.resource"="tmp_es/doc",
"es.mapping.id"="id",
-- dst:src
"es.mapping.names"="update_time:updateTime"
);
select * from default.tmp_es;
Strack trace:
Failed with exception java.io.IOException: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'
Version Info
OS: : CentOS 7
JVM : jdk8
Hadoop/Spark: hadoop 2.7
Hive: 2.1.1
ES-Hadoop : 7.17.11
ES : 5.5.3
Metadata
Metadata
Assignees
Labels
No labels