[GitHub] spark pull request #17405: [SPARK-19970][SQL][Follow-up] Table owner should ...
Github user asfgit closed the pull request at: https://github.com/apache/spark/pull/17405 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request #17405: [SPARK-19970][SQL][Follow-up] Table owner should ...
Github user gatorsmile commented on a diff in the pull request: https://github.com/apache/spark/pull/17405#discussion_r107841074 --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala --- @@ -207,6 +207,8 @@ private[hive] class HiveClientImpl( /** Returns the configuration for the current session. */ def conf: HiveConf = state.getConf + private val userName = state.getAuthenticator.getUserName --- End diff -- All the `SparkSession`s share the same internal Hive `SessionState`. After we create it, it will be set, if my understanding is not wrong, no matter which `HiveAuthenticationProvider` that users choose. Previously, before merging the PR https://github.com/apache/spark/pull/17311, do we have the same issue? cc @vanzin @dongjoon-hyun @yhuai --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request #17405: [SPARK-19970][SQL][Follow-up] Table owner should ...
Github user cloud-fan commented on a diff in the pull request: https://github.com/apache/spark/pull/17405#discussion_r107831936 --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala --- @@ -207,6 +207,8 @@ private[hive] class HiveClientImpl( /** Returns the configuration for the current session. */ def conf: HiveConf = state.getConf + private val userName = state.getAuthenticator.getUserName --- End diff -- is this `userName` shared by all `SparkSession`s? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request #17405: [SPARK-19970][SQL][Follow-up] Table owner should ...
Github user gatorsmile commented on a diff in the pull request: https://github.com/apache/spark/pull/17405#discussion_r107831203 --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala --- @@ -441,7 +443,7 @@ private[hive] class HiveClientImpl( } override def createTable(table: CatalogTable, ignoreIfExists: Boolean): Unit = withHiveState { -client.createTable(toHiveTable(table, Some(conf)), ignoreIfExists) +client.createTable(toHiveTable(table), ignoreIfExists) --- End diff -- uh, I forgot to change it back... --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request #17405: [SPARK-19970][SQL][Follow-up] Table owner should ...
Github user dongjoon-hyun commented on a diff in the pull request: https://github.com/apache/spark/pull/17405#discussion_r107829978 --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala --- @@ -441,7 +443,7 @@ private[hive] class HiveClientImpl( } override def createTable(table: CatalogTable, ignoreIfExists: Boolean): Unit = withHiveState { -client.createTable(toHiveTable(table, Some(conf)), ignoreIfExists) +client.createTable(toHiveTable(table), ignoreIfExists) --- End diff -- This has different semantics because it'll always skip setting the owner. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request #17405: [SPARK-19970][SQL][Follow-up] Table owner should ...
Github user gatorsmile commented on a diff in the pull request: https://github.com/apache/spark/pull/17405#discussion_r107821515 --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala --- @@ -851,10 +851,10 @@ private[hive] object HiveClientImpl { hiveTable.setFields(schema.asJava) } hiveTable.setPartCols(partCols.asJava) -conf.foreach { _ => hiveTable.setOwner(SessionState.get().getAuthenticator().getUserName()) } --- End diff -- Users could get the weird exception `java.lang.NullPointerException`. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request #17405: [SPARK-19970][SQL][Follow-up] Table owner should ...
GitHub user gatorsmile opened a pull request: https://github.com/apache/spark/pull/17405 [SPARK-19970][SQL][Follow-up] Table owner should be USER instead of PRINCIPAL in kerberized clusters #17311 ### What changes were proposed in this pull request? - For safety, use `sessionState` to get the user name, instead of calling `SessionState.get()` in the function `toHiveTable`. - Passing `user names` instead of `conf` when calling `toHiveTable`. ### How was this patch tested? N/A You can merge this pull request into a Git repository by running: $ git pull https://github.com/gatorsmile/spark user Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/17405.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #17405 commit b45ad79f5326a3720b4d53cc8a2eadfdcf636b62 Author: Xiao Li Date: 2017-03-24T01:42:29Z fix. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org