YARN-5809. AsyncDispatcher possibly invokes multiple shutdown threads when handling exception (Jian He via Varun Saxena)

This commit is contained in:
Varun Saxena 2016-11-01 04:19:00 +05:30
parent 0c49f73a6c
commit 07ab89e8bb

View File

@ -195,6 +195,7 @@ protected void dispatch(Event event) {
if (exitOnDispatchException
&& (ShutdownHookManager.get().isShutdownInProgress()) == false
&& stopped == false) {
stopped = true;
Thread shutDownThread = new Thread(createShutDownThread());
shutDownThread.setName("AsyncDispatcher ShutDown handler");
shutDownThread.start();