YARN-2917. Fixed potential deadlock when system.exit is called in AsyncDispatcher. Contributed by Rohith Sharmaks
This commit is contained in:
parent
8e9a266819
commit
614b6afea4
|
@ -214,6 +214,9 @@ Release 2.7.0 - UNRELEASED
|
||||||
YARN-2924. Fixed RMAdminCLI to not convert node labels to lower case.
|
YARN-2924. Fixed RMAdminCLI to not convert node labels to lower case.
|
||||||
(Wangda Tan via jianhe)
|
(Wangda Tan via jianhe)
|
||||||
|
|
||||||
|
YARN-2917. Fixed potential deadlock when system.exit is called in AsyncDispatcher
|
||||||
|
(Rohith Sharmaks via jianhe)
|
||||||
|
|
||||||
Release 2.6.0 - 2014-11-18
|
Release 2.6.0 - 2014-11-18
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -181,8 +181,9 @@ public class AsyncDispatcher extends AbstractService implements Dispatcher {
|
||||||
if (exitOnDispatchException
|
if (exitOnDispatchException
|
||||||
&& (ShutdownHookManager.get().isShutdownInProgress()) == false
|
&& (ShutdownHookManager.get().isShutdownInProgress()) == false
|
||||||
&& stopped == false) {
|
&& stopped == false) {
|
||||||
LOG.info("Exiting, bbye..");
|
Thread shutDownThread = new Thread(createShutDownThread());
|
||||||
System.exit(-1);
|
shutDownThread.setName("AsyncDispatcher ShutDown handler");
|
||||||
|
shutDownThread.start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -271,4 +272,14 @@ public class AsyncDispatcher extends AbstractService implements Dispatcher {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Runnable createShutDownThread() {
|
||||||
|
return new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
LOG.info("Exiting, bbye..");
|
||||||
|
System.exit(-1);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue