Allow multiple hosts for elasticsearch connector#12530
Allow multiple hosts for elasticsearch connector#12530martint merged 1 commit intotrinodb:masterfrom
Conversation
|
Quote from the issue:
I suppose this PR still find nodes by schedule. |
|
When the first start trino server, it can try all configed elasticsearch.host hosts to makes sure the es connector worked well, and the schedule nodes can get successfully.
After:
|
|
@bitsondatadev Could you help review this pr? Thanks! |
There was a problem hiding this comment.
This should be a List<String> not a String. The splitting on , will be done by the configuration system. It shouldn't be done by ElasticsearchClient. Otherwise, it's hard to do any validation and error reporting at startup time.
There was a problem hiding this comment.
Thanks for review! @martint Did the changes, could you help review again? Thanks in advance!
There was a problem hiding this comment.
The above comment means changing the argument to List<String> instead of splitting by yourself.
There was a problem hiding this comment.
@ebyhr Thanks for clarify! Did the changes. Thanks again!
327ed99 to
905a091
Compare
There was a problem hiding this comment.
This test is unnecessary. It doesn't validate anything about the state of the client or that it works -- just that it can be constructed.
Let's remove it.
There was a problem hiding this comment.
@martint Thanks for your comments! Remove the test.
Description
improvement
No
Allow multiple hosts for elasticsearch connector (elasticsearch.host property)
Related issues, pull requests, and links
Fixes #11889
Documentation
( ) No documentation is needed.
( ) Sufficient documentation is included in this PR.
( ) Documentation PR is available with #prnumber.
(X) Documentation issue #12528 is filed, and can be handled later.
Release notes
(x) Release notes entries required with the following suggested text: