YARN-6189: Improve application status log message when RM restarted when

app is in NEW state. Contributed by Junping Du
This commit is contained in:
Xuan 2017-02-28 11:04:56 -08:00
parent eac6b4c35c
commit e0bb867c3f
2 changed files with 12 additions and 6 deletions

View File

@ -359,7 +359,8 @@ public GetApplicationReportResponse getApplicationReport(
// If the RM doesn't have the application, throw
// ApplicationNotFoundException and let client to handle.
throw new ApplicationNotFoundException("Application with id '"
+ applicationId + "' doesn't exist in RM.");
+ applicationId + "' doesn't exist in RM. Please check "
+ "that the job submission was successful.");
}
boolean allowAccess = checkAccess(callerUGI, application.getUser(),
@ -393,7 +394,8 @@ public GetApplicationAttemptReportResponse getApplicationAttemptReport(
// ApplicationNotFoundException and let client to handle.
throw new ApplicationNotFoundException("Application with id '"
+ request.getApplicationAttemptId().getApplicationId()
+ "' doesn't exist in RM.");
+ "' doesn't exist in RM. Please check that the job "
+ "submission was successful.");
}
boolean allowAccess = checkAccess(callerUGI, application.getUser(),
@ -432,7 +434,8 @@ public GetApplicationAttemptsResponse getApplicationAttempts(
// If the RM doesn't have the application, throw
// ApplicationNotFoundException and let client to handle.
throw new ApplicationNotFoundException("Application with id '" + appId
+ "' doesn't exist in RM.");
+ "' doesn't exist in RM. Please check that the job submission "
+ "was successful.");
}
boolean allowAccess = checkAccess(callerUGI, application.getUser(),
ApplicationAccessType.VIEW_APP, application);
@ -480,7 +483,8 @@ public GetContainerReportResponse getContainerReport(
// If the RM doesn't have the application, throw
// ApplicationNotFoundException and let client to handle.
throw new ApplicationNotFoundException("Application with id '" + appId
+ "' doesn't exist in RM.");
+ "' doesn't exist in RM. Please check that the job submission "
+ "was successful.");
}
boolean allowAccess = checkAccess(callerUGI, application.getUser(),
ApplicationAccessType.VIEW_APP, application);
@ -530,7 +534,8 @@ public GetContainersResponse getContainers(GetContainersRequest request)
// If the RM doesn't have the application, throw
// ApplicationNotFoundException and let client to handle.
throw new ApplicationNotFoundException("Application with id '" + appId
+ "' doesn't exist in RM.");
+ "' doesn't exist in RM. Please check that the job submission "
+ "was successful.");
}
boolean allowAccess = checkAccess(callerUGI, application.getUser(),
ApplicationAccessType.VIEW_APP, application);

View File

@ -283,7 +283,8 @@ public void testNonExistingApplicationReport() throws YarnException {
} catch (ApplicationNotFoundException ex) {
Assert.assertEquals(ex.getMessage(),
"Application with id '" + request.getApplicationId()
+ "' doesn't exist in RM.");
+ "' doesn't exist in RM. Please check that the "
+ "job submission was successful.");
}
}