aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala b/yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala
index 598eb17d5d..9bb369549d 100644
--- a/yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala
+++ b/yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala
@@ -980,7 +980,6 @@ private[spark] class Client(
amContainer.setApplicationACLs(
YarnSparkHadoopUtil.getApplicationAclsForYarn(securityManager).asJava)
setupSecurityToken(amContainer)
- UserGroupInformation.getCurrentUser().addCredentials(credentials)
amContainer
}
@@ -1001,7 +1000,8 @@ private[spark] class Client(
sparkConf.set(KEYTAB.key, keytabFileName)
sparkConf.set(PRINCIPAL.key, principal)
}
- credentials = UserGroupInformation.getCurrentUser.getCredentials
+ // Defensive copy of the credentials
+ credentials = new Credentials(UserGroupInformation.getCurrentUser.getCredentials)
}
/**