Skip to content

Commit 5aebef1

Browse files
mgorbovMikhail Gorbov
authored andcommitted
[27845] Fixed the way Spark determines Hive’s security configuration (apache#119)
(cherry picked from commit 52b06b9)
1 parent 595cb8a commit 5aebef1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/security/HiveCredentialProvider.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ private[security] class HiveCredentialProvider extends ServiceCredentialProvider
5555
}
5656
}
5757

58-
override def credentialsRequired(hadoopConf: Configuration): Boolean = {
58+
override def credentialsRequired(hadoopConf: Configuration): Boolean =
5959
UserGroupInformation.isSecurityEnabled &&
60-
hiveConf(hadoopConf).getTrimmed("hive.metastore.uris", "").nonEmpty
61-
}
60+
hiveConf(hadoopConf).getTrimmed("hive.metastore.uris", "").nonEmpty &&
61+
hiveConf(hadoopConf).getBoolean("hive.metastore.sasl.enabled", false)
6262

6363
override def obtainCredentials(
6464
hadoopConf: Configuration,

0 commit comments

Comments
 (0)