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

This commit is contained in:
Jian He 2017-01-06 18:19:09 -08:00
parent 71a4acf74b
commit 020316458d
1 changed files with 4 additions and 5 deletions

View File

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