Skip to content

Commit 59253b3

Browse files
committed
SPARK-10181 UserGroupInformation class needs to be shared for login credentials
1 parent 89e6db6 commit 59253b3

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ private[hive] object HiveContext {
697697
doc = "TODO")
698698

699699
val HIVE_METASTORE_SHARED_PREFIXES = stringSeqConf("spark.sql.hive.metastore.sharedPrefixes",
700-
defaultValue = Some(jdbcPrefixes),
700+
defaultValue = Some(jdbcPrefixes ++ securityPrefixes),
701701
doc = "A comma separated list of class prefixes that should be loaded using the classloader " +
702702
"that is shared between Spark SQL and a specific version of Hive. An example of classes " +
703703
"that should be shared is JDBC drivers that are needed to talk to the metastore. Other " +
@@ -707,6 +707,11 @@ private[hive] object HiveContext {
707707
private def jdbcPrefixes = Seq(
708708
"com.mysql.jdbc", "org.postgresql", "com.microsoft.sqlserver", "oracle.jdbc")
709709

710+
private def securityPrefixes = Seq(
711+
"org.apache.hadoop.security.UserGroupInformation",
712+
"org.apache.hadoop.security.token.Token",
713+
"org.apache.hadoop.io.Text")
714+
710715
val HIVE_METASTORE_BARRIER_PREFIXES = stringSeqConf("spark.sql.hive.metastore.barrierPrefixes",
711716
defaultValue = Some(Seq()),
712717
doc = "A comma separated list of class prefixes that should explicitly be reloaded for each " +

0 commit comments

Comments
 (0)