YARN-6009. Skip validating app timeout value on recovery. Contributed by Rohith Sharma K S

(cherry picked from commit 020316458d)
This commit is contained in:
Jian He 2017-01-06 18:19:09 -08:00
parent 81da7d1d30
commit ba5d482366
1 changed files with 4 additions and 5 deletions

View File

@ -340,13 +340,16 @@ public class RMAppManager implements EventHandler<RMAppManagerEvent>,
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<RMAppManagerEvent>,
}
}
// 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,