-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-19970][SQL][Follow-up] Table owner should be USER instead of PRINCIPAL in kerberized clusters #17311 #17405
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
|
Test build #75134 has finished for PR 17405 at commit
|
|
|
||
| override def createTable(table: CatalogTable, ignoreIfExists: Boolean): Unit = withHiveState { | ||
| client.createTable(toHiveTable(table, Some(conf)), ignoreIfExists) | ||
| client.createTable(toHiveTable(table), ignoreIfExists) |
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 has different semantics because it'll always skip setting the owner.
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.
uh, I forgot to change it back... Thanks for catching it.
| /** Returns the configuration for the current session. */ | ||
| def conf: HiveConf = state.getConf | ||
|
|
||
| private val userName = state.getAuthenticator.getUserName |
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 userName shared by all SparkSessions?
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.
All the SparkSessions share the same internal Hive SessionState. After we create it, the user name is set, if my understanding is not wrong, no matter which HiveAuthenticationProvider that users choose.
Previously, before merging the PR #17311, do we have the same issue?
|
Test build #75142 has finished for PR 17405 at commit
|
|
@gatorsmile . It looks good to me. Thank you for refactoring. |
|
thanks, merging to master! |
What changes were proposed in this pull request?
This is a follow-up for the PR: #17311
sessionStateto get the user name, instead of callingSessionState.get()in the functiontoHiveTable.user namesinstead ofconfwhen callingtoHiveTable.How was this patch tested?
N/A