HDFS-4426. Secondary namenode shuts down immediately after startup. Contributed by Arpit Agarwal.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1437627 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Suresh Srinivas 2013-01-23 19:00:39 +00:00
parent 345bcee066
commit a1e6df6bc4
2 changed files with 15 additions and 0 deletions

View File

@ -2244,6 +2244,9 @@ Release 0.23.6 - UNRELEASED
HDFS-4385. Maven RAT plugin is not checking all source files (tgraves) HDFS-4385. Maven RAT plugin is not checking all source files (tgraves)
HDFS-4426. Secondary namenode shuts down immediately after startup.
(Arpit Agarwal via suresh)
Release 0.23.5 - 2012-11-28 Release 0.23.5 - 2012-11-28
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -281,6 +281,17 @@ public class SecondaryNameNode implements Runnable {
LOG.info("Log Size Trigger :" + checkpointConf.getTxnCount() + " txns"); LOG.info("Log Size Trigger :" + checkpointConf.getTxnCount() + " txns");
} }
/**
* Wait for the service to finish.
* (Normally, it runs forever.)
*/
private void join() {
try {
infoServer.join();
} catch (InterruptedException ie) {
}
}
/** /**
* Shut down this instance of the datanode. * Shut down this instance of the datanode.
* Returns only after shutdown is complete. * Returns only after shutdown is complete.
@ -607,6 +618,7 @@ public class SecondaryNameNode implements Runnable {
if (secondary != null) { if (secondary != null) {
secondary.startCheckpointThread(); secondary.startCheckpointThread();
secondary.join();
} }
} }