Skip to content

Commit 9dfbf82

Browse files
committed
[SPARK-19970][SQL] Table owner should be USER instead of PRINCIPAL in kerberized clusters
1 parent 1472cac commit 9dfbf82

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,7 @@ private[hive] object HiveClientImpl {
851851
hiveTable.setFields(schema.asJava)
852852
}
853853
hiveTable.setPartCols(partCols.asJava)
854-
conf.foreach(c => hiveTable.setOwner(c.getUser))
854+
conf.foreach(c => hiveTable.setOwner(SessionState.getUserFromAuthenticator()))
855855
hiveTable.setCreateTime((table.createTime / 1000).toInt)
856856
hiveTable.setLastAccessTime((table.lastAccessTime / 1000).toInt)
857857
table.storage.locationUri.map(CatalogUtils.URIToString(_)).foreach { loc =>

0 commit comments

Comments
 (0)