hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject [1/5] git commit: HDFS-7111. TestSafeMode assumes Unix line endings in safe mode tip. Contributed by Chris Nauroth.
Date Thu, 25 Sep 2014 19:56:31 GMT
Repository: hadoop
Updated Branches:
  refs/heads/HDFS-6581 364e60b16 -> 5a5a7da3a


HDFS-7111. TestSafeMode assumes Unix line endings in safe mode tip. Contributed by Chris Nauroth.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/dc2ebf88
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/dc2ebf88
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/dc2ebf88

Branch: refs/heads/HDFS-6581
Commit: dc2ebf88a8e6fdf752b3f67933ff6c276ab90921
Parents: e0b1dc5
Author: cnauroth <cnauroth@apache.org>
Authored: Thu Sep 25 11:17:46 2014 -0700
Committer: cnauroth <cnauroth@apache.org>
Committed: Thu Sep 25 11:17:46 2014 -0700

----------------------------------------------------------------------
 hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt                 | 3 +++
 .../src/test/java/org/apache/hadoop/hdfs/TestSafeMode.java  | 9 +++++----
 2 files changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/dc2ebf88/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
index ec4674b..bde6fde 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -950,6 +950,9 @@ Release 2.6.0 - UNRELEASED
 
     HDFS-6534. Fix build on macosx: HDFS parts (Binglin Chang via aw)
 
+    HDFS-7111. TestSafeMode assumes Unix line endings in safe mode tip.
+    (cnauroth)
+
 Release 2.5.1 - 2014-09-05
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/dc2ebf88/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestSafeMode.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestSafeMode.java
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestSafeMode.java
index 3db66f5..5c78dbe 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestSafeMode.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestSafeMode.java
@@ -66,6 +66,7 @@ public class TestSafeMode {
   public static final Log LOG = LogFactory.getLog(TestSafeMode.class);
   private static final Path TEST_PATH = new Path("/test");
   private static final int BLOCK_SIZE = 1024;
+  private static final String NEWLINE = System.getProperty("line.separator");
   Configuration conf; 
   MiniDFSCluster cluster;
   FileSystem fs;
@@ -196,7 +197,7 @@ public class TestSafeMode {
     
     String status = nn.getNamesystem().getSafemode();
     assertEquals("Safe mode is ON. The reported blocks 0 needs additional " +
-        "15 blocks to reach the threshold 0.9990 of total blocks 15.\n" +
+        "15 blocks to reach the threshold 0.9990 of total blocks 15." + NEWLINE +
         "The number of live datanodes 0 has reached the minimum number 0. " +
         "Safe mode will be turned off automatically once the thresholds " +
         "have been reached.", status);
@@ -448,9 +449,9 @@ public class TestSafeMode {
 
     String tipMsg = cluster.getNamesystem().getSafemode();
     assertTrue("Safemode tip message doesn't look right: " + tipMsg,
-               tipMsg.contains("The number of live datanodes 0 needs an additional " +
-                               "1 live datanodes to reach the minimum number 1.\n" +
-                               "Safe mode will be turned off automatically"));
+      tipMsg.contains("The number of live datanodes 0 needs an additional " +
+                      "1 live datanodes to reach the minimum number 1." +
+                      NEWLINE + "Safe mode will be turned off automatically"));
 
     // Start a datanode
     cluster.startDataNodes(conf, 1, true, null, null);


Mime
View raw message