You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (JIRA)" <ji...@apache.org> on 2017/12/20 13:17:00 UTC

[jira] [Commented] (SPARK-22846) table's owner property in hive metastore is null

    [ https://issues.apache.org/jira/browse/SPARK-22846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16298474#comment-16298474 ] 

Apache Spark commented on SPARK-22846:
--------------------------------------

User 'BruceXu1991' has created a pull request for this issue:
https://github.com/apache/spark/pull/20034

> table's owner property in hive metastore is null
> ------------------------------------------------
>
>                 Key: SPARK-22846
>                 URL: https://issues.apache.org/jira/browse/SPARK-22846
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.2.1
>         Environment: spark 2.2.1, hive 0.14, hadoop 2.6.0
>            Reporter: bruce xu
>            Priority: Critical
>         Attachments: talbe_owner_null.png
>
>
> I met this issue after upgrading from spark 2.0.1 to spark 2.2.1.
> when creating table using spark sql or spark thriftserver, it occured that the table's owner info in metastore is null, which may cause other issue on table authentication. It may be a bug.
> After digging into the code, I found that in class HiveClientImpl:
> {code:java}
> private val userName = state.getAuthenticator.getUserName
> {code}
> the result of state.getAuthenticator.getUserName is null, which would cause all operation on tables have a null username, such as method toHiveTable:
> {code:java}
>  def toHiveTable(table: CatalogTable, userName: Option[String] = None): HiveTable = {
> {code}
> my create table command:  create table  datapm.test_xwc9(id string,name string);



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org