From e3fcb711d678bb26cb4e99d25503506ff3bd3797 Mon Sep 17 00:00:00 2001 From: Rohith Sharma K S Date: Thu, 29 Oct 2015 12:22:44 +0530 Subject: [PATCH] YARN-4130. Duplicate declaration of ApplicationId in RMAppManager#submitApplication method. (Kai Sasaki via rohithsharmaks) (cherry picked from commit 656c8f952738f469766ede729dc0f25a3ce4214e) --- hadoop-yarn-project/CHANGES.txt | 3 +++ .../hadoop/yarn/server/resourcemanager/RMAppManager.java | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index 34501ecd020..4103a5c07d3 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -979,6 +979,9 @@ Release 2.8.0 - UNRELEASED YARN-4251. TestAMRMClientOnRMRestart#testAMRMClientOnAMRMTokenRollOverOnRMRestart is failing. (Brahma Reddy Battula via ozawa) + YARN-4130. Duplicate declaration of ApplicationId in RMAppManager#submitApplication method. + (Kai Sasaki via rohithsharmaks) + Release 2.7.2 - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/RMAppManager.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/RMAppManager.java index 0b7083c45f9..711a7a7c0ab 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/RMAppManager.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/RMAppManager.java @@ -281,14 +281,14 @@ public class RMAppManager implements EventHandler, RMAppImpl application = createAndPopulateNewRMApp(submissionContext, submitTime, user, false); - ApplicationId appId = submissionContext.getApplicationId(); Credentials credentials = null; try { credentials = parseCredentials(submissionContext); if (UserGroupInformation.isSecurityEnabled()) { - this.rmContext.getDelegationTokenRenewer().addApplicationAsync(appId, - credentials, submissionContext.getCancelTokensWhenComplete(), - application.getUser()); + this.rmContext.getDelegationTokenRenewer() + .addApplicationAsync(applicationId, credentials, + submissionContext.getCancelTokensWhenComplete(), + application.getUser()); } else { // Dispatcher is not yet started at this time, so these START events // enqueued should be guaranteed to be first processed when dispatcher