YARN-1919. Potential NPE in EmbeddedElectorService#stop. (Tsuyoshi Ozawa via kasha)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1619253 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8b8fe3a425
commit
bf0e9e894d
|
@ -205,6 +205,9 @@ Release 2.6.0 - UNRELEASED
|
||||||
YARN-2034. Description for yarn.nodemanager.localizer.cache.target-size-mb
|
YARN-2034. Description for yarn.nodemanager.localizer.cache.target-size-mb
|
||||||
is incorrect (Chen He via jlowe)
|
is incorrect (Chen He via jlowe)
|
||||||
|
|
||||||
|
YARN-1919. Potential NPE in EmbeddedElectorService#stop.
|
||||||
|
(Tsuyoshi Ozawa via kasha)
|
||||||
|
|
||||||
Release 2.5.0 - 2014-08-11
|
Release 2.5.0 - 2014-08-11
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -109,8 +109,14 @@ public class EmbeddedElectorService extends AbstractService
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void serviceStop() throws Exception {
|
protected void serviceStop() throws Exception {
|
||||||
|
/**
|
||||||
|
* When error occurs in serviceInit(), serviceStop() can be called.
|
||||||
|
* We need null check for the case.
|
||||||
|
*/
|
||||||
|
if (elector != null) {
|
||||||
elector.quitElection(false);
|
elector.quitElection(false);
|
||||||
elector.terminateConnection();
|
elector.terminateConnection();
|
||||||
|
}
|
||||||
super.serviceStop();
|
super.serviceStop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue