From ba5d482366fad3e2187cc4c0f806e2af864fef40 Mon Sep 17 00:00:00 2001 From: Jian He Date: Fri, 6 Jan 2017 18:19:09 -0800 Subject: [PATCH] YARN-6009. Skip validating app timeout value on recovery. Contributed by Rohith Sharma K S (cherry picked from commit 020316458dfe6059b700f8d93a9791e4cb817b3f) --- .../hadoop/yarn/server/resourcemanager/RMAppManager.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 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 d18a5f6858c..a8084451cbe 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 @@ -340,13 +340,16 @@ public class RMAppManager implements EventHandler, private RMAppImpl createAndPopulateNewRMApp( ApplicationSubmissionContext submissionContext, long submitTime, String user, boolean isRecovery) 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(); @@ -388,10 +391,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, submissionContext.getApplicationName(), user,