ソースを参照

svn merge -c 1330506 from trunk for HDFS-3321. Fix safe mode turn off tip message.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.23@1330510 13f79535-47bb-0310-9956-ffa450edef68
Tsz-wo Sze 13 年 前
コミット
0365b77a1b

+ 2 - 0
hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt

@@ -32,6 +32,8 @@ Release 0.23.3 - UNRELEASED
     HDFS-3318. Use BoundedInputStream in ByteRangeInputStream, otherwise, it
     hangs on transfers >2 GB.  (Daryn Sharp via szetszwo)
 
+    HDFS-3321. Fix safe mode turn off tip message.  (Ravi Prakash via szetszwo)
+
 Release 0.23.2 - UNRELEASED
 
   INCOMPATIBLE CHANGES

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

@@ -3160,7 +3160,7 @@ public class FSNamesystem implements Namesystem, FSClusterStats,
           msg += String.format(
             "The number of live datanodes %d needs an additional %d live "
             + "datanodes to reach the minimum number %d.",
-            numLive, (datanodeThreshold - numLive) + 1 , datanodeThreshold);
+            numLive, (datanodeThreshold - numLive), datanodeThreshold);
         }
         msg += " " + leaveMsg;
       } else {

+ 1 - 1
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestSafeMode.java

@@ -342,7 +342,7 @@ public class TestSafeMode {
     String tipMsg = cluster.getNamesystem().getSafemode();
     assertTrue("Safemode tip message looks right: " + tipMsg,
                tipMsg.contains("The number of live datanodes 0 needs an additional " +
-                               "2 live datanodes to reach the minimum number 1. " +
+                               "1 live datanodes to reach the minimum number 1. " +
                                "Safe mode will be turned off automatically."));
 
     // Start a datanode