Repository: spark Updated Branches: refs/heads/branch-2.0 849fe3534 -> a2540b936
[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 <ssan...@datameer.com> Closes #13499 from subrotosanyal/SPARK-15754-save-ugi-from-changing. (cherry picked from commit 61d729abdaf9bdd54aea74a643828d570b036d87) Signed-off-by: Marcelo Vanzin <van...@cloudera.com> Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/a2540b93 Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/a2540b93 Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/a2540b93 Branch: refs/heads/branch-2.0 Commit: a2540b9367b228e925ab97d7fde859e02f1e1158 Parents: 849fe35 Author: Subroto Sanyal <ssan...@datameer.com> Authored: Fri Jun 3 16:50:00 2016 -0700 Committer: Marcelo Vanzin <van...@cloudera.com> Committed: Fri Jun 3 16:50:11 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/a2540b93/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 598eb17..9bb3695 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) } /** --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org