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 d0425907f6a..c5a9da4d935 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 @@ -379,10 +379,16 @@ public class RMAppManager implements EventHandler, // 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