YARN-6189: Improve application status log message when RM restarted when
app is in NEW state. Contributed by Junping Du
(cherry picked from commit e0bb867c3f
)
This commit is contained in:
parent
df35ba81fe
commit
95bd3c3d55
|
@ -357,7 +357,8 @@ public GetApplicationReportResponse getApplicationReport(
|
||||||
// If the RM doesn't have the application, throw
|
// If the RM doesn't have the application, throw
|
||||||
// ApplicationNotFoundException and let client to handle.
|
// ApplicationNotFoundException and let client to handle.
|
||||||
throw new ApplicationNotFoundException("Application with id '"
|
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(),
|
boolean allowAccess = checkAccess(callerUGI, application.getUser(),
|
||||||
|
@ -391,7 +392,8 @@ public GetApplicationAttemptReportResponse getApplicationAttemptReport(
|
||||||
// ApplicationNotFoundException and let client to handle.
|
// ApplicationNotFoundException and let client to handle.
|
||||||
throw new ApplicationNotFoundException("Application with id '"
|
throw new ApplicationNotFoundException("Application with id '"
|
||||||
+ request.getApplicationAttemptId().getApplicationId()
|
+ 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(),
|
boolean allowAccess = checkAccess(callerUGI, application.getUser(),
|
||||||
|
@ -430,7 +432,8 @@ public GetApplicationAttemptsResponse getApplicationAttempts(
|
||||||
// If the RM doesn't have the application, throw
|
// If the RM doesn't have the application, throw
|
||||||
// ApplicationNotFoundException and let client to handle.
|
// ApplicationNotFoundException and let client to handle.
|
||||||
throw new ApplicationNotFoundException("Application with id '" + appId
|
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(),
|
boolean allowAccess = checkAccess(callerUGI, application.getUser(),
|
||||||
ApplicationAccessType.VIEW_APP, application);
|
ApplicationAccessType.VIEW_APP, application);
|
||||||
|
@ -478,7 +481,8 @@ public GetContainerReportResponse getContainerReport(
|
||||||
// If the RM doesn't have the application, throw
|
// If the RM doesn't have the application, throw
|
||||||
// ApplicationNotFoundException and let client to handle.
|
// ApplicationNotFoundException and let client to handle.
|
||||||
throw new ApplicationNotFoundException("Application with id '" + appId
|
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(),
|
boolean allowAccess = checkAccess(callerUGI, application.getUser(),
|
||||||
ApplicationAccessType.VIEW_APP, application);
|
ApplicationAccessType.VIEW_APP, application);
|
||||||
|
@ -528,7 +532,8 @@ public GetContainersResponse getContainers(GetContainersRequest request)
|
||||||
// If the RM doesn't have the application, throw
|
// If the RM doesn't have the application, throw
|
||||||
// ApplicationNotFoundException and let client to handle.
|
// ApplicationNotFoundException and let client to handle.
|
||||||
throw new ApplicationNotFoundException("Application with id '" + appId
|
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(),
|
boolean allowAccess = checkAccess(callerUGI, application.getUser(),
|
||||||
ApplicationAccessType.VIEW_APP, application);
|
ApplicationAccessType.VIEW_APP, application);
|
||||||
|
|
|
@ -277,7 +277,8 @@ public void testNonExistingApplicationReport() throws YarnException {
|
||||||
} catch (ApplicationNotFoundException ex) {
|
} catch (ApplicationNotFoundException ex) {
|
||||||
Assert.assertEquals(ex.getMessage(),
|
Assert.assertEquals(ex.getMessage(),
|
||||||
"Application with id '" + request.getApplicationId()
|
"Application with id '" + request.getApplicationId()
|
||||||
+ "' doesn't exist in RM.");
|
+ "' doesn't exist in RM. Please check that the "
|
||||||
|
+ "job submission was successful.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue