瀏覽代碼

HDFS-4426. Secondary namenode shuts down immediately after startup. (Arpit Agarwal via suresh)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.23.6@1439463 13f79535-47bb-0310-9956-ffa450edef68
Thomas Graves 12 年之前
父節點
當前提交
d4657934e2

+ 3 - 39
hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt

@@ -40,6 +40,9 @@ Release 0.23.6 - UNRELEASED
 
     HDFS-4399. precommit release audit warnings (tgraves)
 
+    HDFS-4426. Secondary namenode shuts down immediately after startup.
+    (Arpit Agarwal via suresh)
+
 Release 0.23.5 - 2012-11-28
 
   INCOMPATIBLE CHANGES
@@ -128,45 +131,6 @@ Release 0.23.4
 
 Release 0.23.3
 
-<<<<<<< .working
-=======
-    HDFS-3469. start-dfs.sh will start zkfc, but stop-dfs.sh will not stop zkfc similarly.
-    (Vinay via umamahesh)
-
-    HDFS-1490. TransferFSImage should timeout (Dmytro Molkov and Vinay via todd)
-
-    HDFS-3828. Block Scanner rescans blocks too frequently.
-    (Andy Isaacson via eli)
-
-    HDFS-3809. Make BKJM use protobufs for all serialization with ZK.(Ivan Kelly via umamahesh)
-
-    HDFS-3895. hadoop-client must include commons-cli (tucu)
-
-    HDFS-2757. Cannot read a local block that's being written to when
-    using the local read short circuit. (Jean-Daniel Cryans via eli)
-    
-  BREAKDOWN OF HDFS-3042 SUBTASKS
-
-    HDFS-2185. HDFS portion of ZK-based FailoverController (todd)
-    
-    HDFS-3200. Scope all ZKFC configurations by nameservice (todd)
-    
-    HDFS-3223. add zkfc to hadoop-daemon.sh script (todd)
-    
-    HDFS-3261. TestHASafeMode fails on HDFS-3042 branch (todd)
-    
-    HDFS-3159. Document NN auto-failover setup and configuration (todd)
-    
-    HDFS-3412. Fix findbugs warnings in auto-HA branch (todd)
-    
-    HDFS-3432. TestDFSZKFailoverController tries to fail over too early (todd)
-
-    HDFS-3833. TestDFSShell fails on windows due to concurrent file 
-    read/write. (Brandon Li via suresh)
-
-Release 2.0.0-alpha - 05-23-2012
-
->>>>>>> .merge-right.r1382409
   INCOMPATIBLE CHANGES
 
   NEW FEATURES

+ 15 - 1
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/SecondaryNameNode.java

@@ -313,6 +313,17 @@ public class SecondaryNameNode implements Runnable {
     }
   }
 
+  /**
+   * 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.
@@ -649,9 +660,12 @@ public class SecondaryNameNode implements Runnable {
       terminate(ret);
     }
 
-    // Create a never ending deamon
     Daemon checkpointThread = new Daemon(secondary);
     checkpointThread.start();
+
+    if (secondary != null) {
+      secondary.join();
+    }
   }