WeBankFinTech / Exchangis

Exchangis is a lightweight,highly extensible data exchange platform that supports data transmission between structured and unstructured heterogeneous data sources
https://github.com/WeBankFinTech/Exchangis.git
Apache License 2.0
448 stars 208 forks source link

Exchangis es version problem #56

Closed dlimeng closed 2 years ago

dlimeng commented 3 years ago

The version of es is 6.7, and some methods of RestHighLevelClient before es 6.7 will not be compatible.

Es 6.3 Start RestHighLevelClient datax. Some methods are relatively complete. If you want to be compatible with the small version, you have to make a big adjustment.

If it is not version es 6.7, it will report an error if the compatibility limit is extremely large.

es 版本是6.7 ,es 6.7 以前RestHighLevelClient 的一些方法不会兼容。

es 6.3开始RestHighLevelClient datax中的一些方法相对齐全,如果要兼容小版本得大的调整。

es 不是6.7版本,兼容性限制特别大,就会报错

Caused by: ElasticsearchStatusException[method [HEAD], host [http://192.168.200.18:9212], URI [/linkis_db.node1?include_type_name=false&ignore_unavailable=false&expand_wildcards=open%2Cclosed&allow_no_indices=false], status line [HTTP/1.1 400 Bad Request]]; nested: ResponseException[method [HEAD], host [http://192.168.200.18:9212], URI [/linkis_db.node1?include_type_name=false&ignore_unavailable=false&expand_wildcards=open%2Cclosed&allow_no_indices=false], status line [HTTP/1.1 400 Bad Request]]; nested: ResponseException[method [HEAD], host [http://192.168.200.18:9212], URI [/linkis_db.node1?include_type_name=false&ignore_unavailable=false&expand_wildcards=open%2Cclosed&allow_no_indices=false], status line [HTTP/1.1 400 Bad Request]];
    at org.elasticsearch.client.RestHighLevelClient.parseResponseException(RestHighLevelClient.java:2027)
    at org.elasticsearch.client.RestHighLevelClient.internalPerformRequest(RestHighLevelClient.java:1777)
    at org.elasticsearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:1749)
    at org.elasticsearch.client.IndicesClient.exists(IndicesClient.java:1087)
    at com.webank.wedatasphere.exchangis.datax.plugin.writer.elasticsearchwriter.v6.ElasticRestClient.lambda$existIndices$2(ElasticRestClient.java:145)
    at com.webank.wedatasphere.exchangis.datax.plugin.writer.elasticsearchwriter.v6.ElasticRestClient.execute(ElasticRestClient.java:242)
    ... 11 more
Caused by: org.elasticsearch.client.ResponseException: method [HEAD], host [http://192.168.200.18:9212], URI [/linkis_db.node1?include_type_name=false&ignore_unavailable=false&expand_wildcards=open%2Cclosed&allow_no_indices=false], status line [HTTP/1.1 400 Bad Request]
    at org.elasticsearch.client.RestClient$SyncResponseListener.get(RestClient.java:936)
    at org.elasticsearch.client.RestClient.performRequest(RestClient.java:233)
    at org.elasticsearch.client.RestHighLevelClient.internalPerformRequest(RestHighLevelClient.java:1764)
    ... 15 more
dlimeng commented 3 years ago

RestClient should be used for better compatibility. 为了更好的兼容性应该用RestClient

Davidhua1996 commented 3 years ago

Thanks for your suggestion. In most cases, in the same major version, the parameters of underlying request will be different. We will avoid the bad request in the next release.

jefftlin commented 2 years ago

This has been solved. The latest version is exchangis1.1.1. You can pay attention to it.