YARN-7868. Provide improved error message when YARN service is disabled. Contributed by Eric Yang

This commit is contained in:
Jian He 2018-02-02 11:10:18 -08:00
parent 6e5ba9366f
commit f9a4d4cf23

View File

@ -171,6 +171,10 @@ private int processResponse(ClientResponse response) {
LOG.error("Authentication required");
return EXIT_EXCEPTION_THROWN;
}
if (response.getStatus() == 503) {
LOG.error("YARN Service is unavailable or disabled.");
return EXIT_EXCEPTION_THROWN;
}
try {
ServiceStatus ss = response.getEntity(ServiceStatus.class);
output = ss.getDiagnostics();