-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Add support for user/password auth - Elasticsearch #15877
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
5170a36 to
c1f9773
Compare
aweisberg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this.
So I am generally speaking +1 on what I see in terms of the functional changes, but there is some additional backporting and simplification we can do in the tests (only use high level rest client, remove embedded elastic search server) and I would like to block the PR on including those as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we omitting the refresh policy from Trino? trinodb/trino@bd4b3dd#diff-d16680601d6ec03b7147a7dc5eb1178e73a5c2725a40c0f60c920048aea0e217R110
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should not be omitted, added. Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should remove EmbeddedElasticsearchNode like they did in Trino if we can.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I'll do it in another PR.
7573450 to
1b11c8f
Compare
|
@zhenxiao adding you for review since you have done a lot of ES work. |
|
I mixed up the two links I meant trinodb/trino@bbe718d |
zhenxiao
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good. a few minor things
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shall we make /usr/share/elasticsearch/config/ constant?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about password as PASSWORD?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's keep it the same as Trino
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make elasticsearch:7.8.0 a constant, or 7.8.0 a version constant?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. I'll change it. Thanks
|
@zhenxiao how much is consistency worth with Trino? A lot of these choices for constants are just what Trino did. |
That should be done in another PR and it's on my list. |
|
I don't think it should be a separate PR just because it introduces the additional complexity in this PR instead of doing it the way Trino did it? We are mixing together two change sets from Trino and not taking the entirety of both so we end up with this mixed result. |
I'll port testcontainers changes and get rid of embedded Elasticsearch node and make this PR simpler. Thanks |
aweisberg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks this is relying on EmbeddedElasticSearchNode. We should get rid of the duplication between that and the older RestClient.
Yes, I'll rebase and get rid of it after #15937 |
e6c13f9 to
e2bc9e4
Compare
aweisberg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you squash/fixup so it is the three core commits. Add password authentication. Remove embedded elastic search server, and add the comment from Martin? You don't need to change the order just make it roughly analogous to what happened in Trino.
Also add co-authors to the latter two commits.
presto-elasticsearch/pom.xml
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we end up needing JNA? I don't see it as a dependency in Trino.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Presto has that dependency:
Require upper bound dependencies error for net.java.dev.jna:jna:5.2.0 paths to dependency are:
+-com.facebook.presto:presto-elasticsearch:0.254-SNAPSHOT
+-org.testcontainers:testcontainers:1.15.2
+-org.rnorth.visible-assertions:visible-assertions:2.1.2
+-net.java.dev.jna:jna:5.2.0
and
+-com.facebook.presto:presto-elasticsearch:0.254-SNAPSHOT
+-org.testcontainers:testcontainers:1.15.2
+-com.github.docker-java:docker-java-transport-zerodep:3.2.7
+-net.java.dev.jna:jna:5.5.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove setNodeCount?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trino removed that and other counts in trinodb/trino#3267. I should do it in another PR. Added it back. Thanks
|
OK, well if you can get the commit history cleaned up and get a passing test run I can approve it :-) |
Cherry-pick of trinodb/trino#4165 and trinodb/trino#2591 Co-authored-by: Martin Traverso <mtraverso@gmail.com>
d3013b6 to
31f5ff4
Compare
Done. Please review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't really want to squash all the commits together into a single commit. That erased the history and merged together unrelated changes. We just want to squash the extra modification commits used to be there https://github.com/prestodb/presto/commits/d3013b66e4c904a08fae8faf72cf8128bef2f2d7
Is it possible to restore it without it being a herculean task? Ideally if we cherry-pick three commits we end up with the same three commits on our end.
I didn't find a way to restore the commits. If you like, I can redo it. Thanks |
|
Replaced by #16524. |
Cherry-pick of trinodb/trino#4165,
trinodb/trino#2591 and
trinodb/trino#3331
Co-authored-by: Martin Traverso mtraverso@gmail.com