YARN-8316. Improved diagnostic message for ATS unavailability for YARN Service.
Contributed by Billie Rinaldi
This commit is contained in:
parent
2d19e7d08f
commit
7ff5a40218
|
@ -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 "
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue