YARN-8316. Improved diagnostic message for ATS unavailability for YARN Service.

Contributed by Billie Rinaldi
This commit is contained in:
Eric Yang 2018-05-24 16:26:02 -04:00
parent 2d19e7d08f
commit 7ff5a40218
2 changed files with 3 additions and 3 deletions

View File

@ -400,7 +400,7 @@ public class YarnClientImpl extends YarnClient {
+ e.getMessage());
return null;
}
throw e;
throw new IOException(e);
} catch (NoClassDefFoundError e) {
NoClassDefFoundError wrappedError = new NoClassDefFoundError(
e.getMessage() + ". It appears that the timeline client "

View File

@ -1159,7 +1159,7 @@ public class TestYarnClient extends ParameterizedSchedulerTestBase {
TimelineClient createTimelineClient() throws IOException, YarnException {
timelineClient = mock(TimelineClient.class);
when(timelineClient.getDelegationToken(any(String.class)))
.thenThrow(new IOException("Best effort test exception"));
.thenThrow(new RuntimeException("Best effort test exception"));
return timelineClient;
}
});
@ -1175,7 +1175,7 @@ public class TestYarnClient extends ParameterizedSchedulerTestBase {
client.serviceInit(conf);
client.getTimelineDelegationToken();
Assert.fail("Get delegation token should have thrown an exception");
} catch (Exception e) {
} catch (IOException e) {
// Success
}
}