YARN-6170. TimelineReaderServer should wait to join with HttpServer2 (Sangjin Lee via Varun Saxena)
This commit is contained in:
parent
0aacd8fd25
commit
649deb72fb
@ -110,6 +110,16 @@ protected void serviceStart() throws Exception {
|
||||
startTimelineReaderWebApp();
|
||||
}
|
||||
|
||||
private void join() {
|
||||
// keep the main thread that started the server up until it receives a stop
|
||||
// signal
|
||||
if (readerWebServer != null) {
|
||||
try {
|
||||
readerWebServer.join();
|
||||
} catch (InterruptedException ignore) {}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void serviceStop() throws Exception {
|
||||
if (readerWebServer != null) {
|
||||
@ -194,6 +204,7 @@ public static void main(String[] args) {
|
||||
Configuration conf = new YarnConfiguration();
|
||||
conf.setBoolean(YarnConfiguration.TIMELINE_SERVICE_ENABLED, true);
|
||||
conf.setFloat(YarnConfiguration.TIMELINE_SERVICE_VERSION, 2.0f);
|
||||
startTimelineReaderServer(args, conf);
|
||||
TimelineReaderServer server = startTimelineReaderServer(args, conf);
|
||||
server.join();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user