Amend HDFS-2948. NN throws NPE during shutdown if it fails to startup

Previous patch missed the case where the NN fails to start up when it's starting in standby state.


git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/HDFS-1623@1244813 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Todd Lipcon 2012-02-16 00:58:03 +00:00
parent f7f2ef4447
commit 0663b51ed4
1 changed files with 3 additions and 1 deletions

View File

@ -995,7 +995,9 @@ public class NameNode {
@Override
public void stopStandbyServices() throws IOException {
// TODO(HA): Are we guaranteed to be the only active here?
namesystem.stopStandbyServices();
if (namesystem != null) {
namesystem.stopStandbyServices();
}
}
@Override