diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 7467cde47a..956d41f007 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -2244,6 +2244,9 @@ Release 0.23.6 - UNRELEASED 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 INCOMPATIBLE CHANGES diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/SecondaryNameNode.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/SecondaryNameNode.java index d2f1111588..c22d941010 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/SecondaryNameNode.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/SecondaryNameNode.java @@ -281,6 +281,17 @@ private void initialize(final Configuration conf, 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. * Returns only after shutdown is complete. @@ -607,6 +618,7 @@ public static void main(String[] argv) throws Exception { if (secondary != null) { secondary.startCheckpointThread(); + secondary.join(); } }