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 bc2195262d5..9dd544e537f 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 @@ -342,13 +342,16 @@ public class RMAppManager implements EventHandler, private RMAppImpl createAndPopulateNewRMApp( ApplicationSubmissionContext submissionContext, long submitTime, String user, boolean isRecovery, long startTime) throws YarnException { - // Do queue mapping if (!isRecovery) { + // Do queue mapping if (rmContext.getQueuePlacementManager() != null) { // We only do queue mapping when it's a new application rmContext.getQueuePlacementManager().placeApplication( submissionContext, user); } + // fail the submission if configured application timeout value is invalid + RMServerUtils.validateApplicationTimeouts( + submissionContext.getApplicationTimeouts()); } ApplicationId applicationId = submissionContext.getApplicationId(); @@ -390,10 +393,6 @@ public class RMAppManager implements EventHandler, } } - // fail the submission if configured application timeout value is invalid - RMServerUtils.validateApplicationTimeouts( - submissionContext.getApplicationTimeouts()); - // Create RMApp RMAppImpl application = new RMAppImpl(applicationId, rmContext, this.conf,