-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Use UserNameProvider for ThriftMetastore #15935
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
Use UserNameProvider for ThriftMetastore #15935
Conversation
skrzypo987
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.
Is this a preparation for something bigger?
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.
This can be a singleton defined in the interface itself:
public static final SIMPLE_USER_NAME_PROVIDER = identity -> identity.getUser();
and you can bound it to instance in guice modules
plugin/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/UserNameProvider.java
Outdated
Show resolved
Hide resolved
...hive/src/main/java/io/trino/plugin/hive/metastore/thrift/UgiBasedMetastoreClientFactory.java
Outdated
Show resolved
Hide resolved
...src/main/java/io/trino/plugin/hive/metastore/thrift/TokenFetchingMetastoreClientFactory.java
Outdated
Show resolved
Hide resolved
...in/trino-hive/src/main/java/io/trino/plugin/hive/metastore/thrift/ThriftMetastoreModule.java
Outdated
Show resolved
Hide resolved
9f3d398 to
c8aaaff
Compare
c8aaaff to
ae294a0
Compare
|
@kokosing , @skrzypo987 AC |
ae294a0 to
026a3ae
Compare
026a3ae to
b78172a
Compare
b78172a to
a830d42
Compare

Description
Provides a small decoupling between
ThriftMetastoreClientandConnectorIdentity.As of now only
Thriftmetastore supports impersonation (which will be based onConnectorIdentity) so has moved it closer tothriftpackage - in future we can extend to other metastore if required.Release notes
(x) This is not user-visible or docs only and no release notes are required.