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
1 changed files with 4 additions and 0 deletions

View File

@ -171,6 +171,10 @@ public class ApiServiceClient extends AppAdminClient {
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();