YARN-7692. Skip validating priority acls while recovering applications. Contributed by Sunil G.

(cherry picked from commit c9bf813c9a)
This commit is contained in:
Rohith Sharma K S 2018-01-03 18:20:04 +05:30
parent cb60c05c3a
commit e46142a8c2
1 changed files with 10 additions and 4 deletions

View File

@ -362,10 +362,16 @@ public class RMAppManager implements EventHandler<RMAppManagerEvent>,
// Verify and get the update application priority and set back to // Verify and get the update application priority and set back to
// submissionContext // submissionContext
UserGroupInformation userUgi = UserGroupInformation.createRemoteUser(user); UserGroupInformation userUgi = UserGroupInformation.createRemoteUser(user);
Priority appPriority = scheduler.checkAndGetApplicationPriority(
submissionContext.getPriority(), userUgi, submissionContext.getQueue(), // Application priority needed to be validated only while submitting. During
applicationId); // recovery, validated priority could be recovered from submission context.
submissionContext.setPriority(appPriority); if (!isRecovery) {
Priority appPriority = scheduler.checkAndGetApplicationPriority(
submissionContext.getPriority(), userUgi,
submissionContext.getQueue(),
applicationId);
submissionContext.setPriority(appPriority);
}
// Since FairScheduler queue mapping is done inside scheduler, // Since FairScheduler queue mapping is done inside scheduler,
// if FairScheduler is used and the queue doesn't exist, we should not // if FairScheduler is used and the queue doesn't exist, we should not