Repository: spark Updated Branches: refs/heads/branch-1.6 4259a2858 -> a0cf7d0b2
[SPARK-15754][YARN] Not letting the credentials containing hdfs delegation tokens to be added in current user credential. ## What changes were proposed in this pull request? The credentials are not added to the credentials of UserGroupInformation.getCurrentUser(). Further if the client has possibility to login using keytab then the updateDelegationToken thread is not started on client. ## How was this patch tested? ran dev/run-tests Author: Subroto Sanyal <[email protected]> Closes #13499 from subrotosanyal/SPARK-15754-save-ugi-from-changing. (cherry picked from commit 61d729abdaf9bdd54aea74a643828d570b036d87) Signed-off-by: Marcelo Vanzin <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/a0cf7d0b Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/a0cf7d0b Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/a0cf7d0b Branch: refs/heads/branch-1.6 Commit: a0cf7d0b2e15217b898e6431150e7d5d48961065 Parents: 4259a28 Author: Subroto Sanyal <[email protected]> Authored: Fri Jun 3 16:50:00 2016 -0700 Committer: Marcelo Vanzin <[email protected]> Committed: Fri Jun 3 16:50:22 2016 -0700 ---------------------------------------------------------------------- yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/a0cf7d0b/yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala ---------------------------------------------------------------------- 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 7631aa3..508970d 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 @@ -882,7 +882,6 @@ private[spark] class Client( amContainer.setApplicationACLs( YarnSparkHadoopUtil.getApplicationAclsForYarn(securityManager).asJava) setupSecurityToken(amContainer) - UserGroupInformation.getCurrentUser().addCredentials(credentials) amContainer } @@ -910,7 +909,8 @@ private[spark] class Client( sparkConf.set("spark.yarn.keytab", keytabFileName) sparkConf.set("spark.yarn.principal", principal) } - credentials = UserGroupInformation.getCurrentUser.getCredentials + // Defensive copy of the credentials + credentials = new Credentials(UserGroupInformation.getCurrentUser.getCredentials) } /** --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
