-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-19970][SQL][BRANCH-2.1] Table owner should be USER instead of PRINCIPAL in kerberized clusters #17363
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
…PRINCIPAL in kerberized clusters
| } | ||
| hiveTable.setPartCols(partCols.asJava) | ||
| hiveTable.setOwner(conf.getUser) | ||
| hiveTable.setOwner(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.
|
Test build #74891 has finished for PR 17363 at commit
|
|
This is also tested manually in kerberized cluster, @vanzin . BTW, Spark 1.6 has the same issue at ClientWrapper. According to the Spark dev email, there exists demands on more Apache Spark 1.6.X. May I create a backport for branch-1.6? How do you think about that? For Spark 1.6, it happens only with CREATE TABLE .. AS SELECT statement. |
|
Hi, @vanzin . |
|
Retest this please |
|
Test build #75055 has finished for PR 17363 at commit
|
|
Merging to 2.1 / 2.0. I don't really expect any more 1.6 releases at this point, so I wouldn't bother. |
…PRINCIPAL in kerberized clusters ## What changes were proposed in this pull request? In the kerberized hadoop cluster, when Spark creates tables, the owner of tables are filled with PRINCIPAL strings instead of USER names. This is inconsistent with Hive and causes problems when using [ROLE](https://cwiki.apache.org/confluence/display/Hive/SQL+Standard+Based+Hive+Authorization) in Hive. We had better to fix this. **BEFORE** ```scala scala> sql("create table t(a int)").show scala> sql("desc formatted t").show(false) ... |Owner: |sparkEXAMPLE.COM | | ``` **AFTER** ```scala scala> sql("create table t(a int)").show scala> sql("desc formatted t").show(false) ... |Owner: |spark | | ``` ## How was this patch tested? Manually do `create table` and `desc formatted` because this happens in Kerberized clusters. Author: Dongjoon Hyun <[email protected]> Closes #17363 from dongjoon-hyun/SPARK-19970-2.
|
Failed to merge to 2.0. :-/ |
|
@dongjoon-hyun you'll have to manually close this. |
|
Oo. Thank you so much, @vanzin ! |
What changes were proposed in this pull request?
In the kerberized hadoop cluster, when Spark creates tables, the owner of tables are filled with PRINCIPAL strings instead of USER names. This is inconsistent with Hive and causes problems when using ROLE in Hive. We had better to fix this.
BEFORE
AFTER
How was this patch tested?
Manually do
create tableanddesc formattedbecause this happens in Kerberized clusters.