From c9bf813c9a6c018d14f2bef49ba086ec0e60c761 Mon Sep 17 00:00:00 2001 From: Rohith Sharma K S Date: Wed, 3 Jan 2018 18:20:04 +0530 Subject: [PATCH] YARN-7692. Skip validating priority acls while recovering applications. Contributed by Sunil G. --- .../yarn/server/resourcemanager/RMAppManager.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) 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 5ea11525ae..29830770ec 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 @@ -393,10 +393,16 @@ private RMAppImpl createAndPopulateNewRMApp( // Verify and get the update application priority and set back to // submissionContext UserGroupInformation userUgi = UserGroupInformation.createRemoteUser(user); - Priority appPriority = scheduler.checkAndGetApplicationPriority( - submissionContext.getPriority(), userUgi, submissionContext.getQueue(), - applicationId); - submissionContext.setPriority(appPriority); + + // Application priority needed to be validated only while submitting. During + // recovery, validated priority could be recovered from submission context. + if (!isRecovery) { + Priority appPriority = scheduler.checkAndGetApplicationPriority( + submissionContext.getPriority(), userUgi, + submissionContext.getQueue(), + applicationId); + submissionContext.setPriority(appPriority); + } // Since FairScheduler queue mapping is done inside scheduler, // if FairScheduler is used and the queue doesn't exist, we should not