hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aajis...@apache.org
Subject hadoop git commit: HDFS-9691. TestBlockManagerSafeMode#testCheckSafeMode fails intermittently. Contributed by Mingliang Liu.
Date Mon, 15 Feb 2016 05:03:12 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 a670165bb -> 75c547016


HDFS-9691. TestBlockManagerSafeMode#testCheckSafeMode fails intermittently. Contributed by
Mingliang Liu.

(cherry picked from commit ac5da11399525dd31c49700a0bbf01cd37e347d5)


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

Branch: refs/heads/branch-2
Commit: 75c547016504f13fd52a916cf0df2177b0113bc4
Parents: a670165
Author: Akira Ajisaka <aajisaka@apache.org>
Authored: Mon Feb 15 14:00:09 2016 +0900
Committer: Akira Ajisaka <aajisaka@apache.org>
Committed: Mon Feb 15 14:00:40 2016 +0900

----------------------------------------------------------------------
 hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt                  | 3 +++
 .../server/blockmanagement/TestBlockManagerSafeMode.java     | 8 ++++----
 2 files changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/75c54701/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 152841c..60f82c8 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -80,6 +80,9 @@ Release 2.9.0 - UNRELEASED
     HDFS-9621. Consolidate FSDirStatAndListingOp#createFileStatus to let its
     INodesInPath parameter always include the target INode. (jing9)
 
+    HDFS-9691. TestBlockManagerSafeMode#testCheckSafeMode fails intermittently.
+    (Mingliang Liu via aajisaka)
+
 Release 2.8.0 - UNRELEASED
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/75c54701/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockManagerSafeMode.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockManagerSafeMode.java
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockManagerSafeMode.java
index 5079983..18fbab7 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockManagerSafeMode.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockManagerSafeMode.java
@@ -136,30 +136,30 @@ public class TestBlockManagerSafeMode {
     }
 
     // PENDING_THRESHOLD -> EXTENSION
+    Whitebox.setInternalState(bmSafeMode, "extension", Integer.MAX_VALUE);
     setSafeModeStatus(BMSafeModeStatus.PENDING_THRESHOLD);
     setBlockSafe(BLOCK_THRESHOLD);
     bmSafeMode.checkSafeMode();
     assertEquals(BMSafeModeStatus.EXTENSION, getSafeModeStatus());
-    Whitebox.setInternalState(bmSafeMode, "smmthread", null);
 
     // PENDING_THRESHOLD -> OFF
+    Whitebox.setInternalState(bmSafeMode, "extension", 0);
     setSafeModeStatus(BMSafeModeStatus.PENDING_THRESHOLD);
     setBlockSafe(BLOCK_THRESHOLD);
-    Whitebox.setInternalState(bmSafeMode, "extension", 0);
     bmSafeMode.checkSafeMode();
     assertEquals(BMSafeModeStatus.OFF, getSafeModeStatus());
 
     // stays in EXTENSION
-    setSafeModeStatus(BMSafeModeStatus.EXTENSION);
     setBlockSafe(0);
+    setSafeModeStatus(BMSafeModeStatus.EXTENSION);
     Whitebox.setInternalState(bmSafeMode, "extension", 0);
     bmSafeMode.checkSafeMode();
     assertEquals(BMSafeModeStatus.EXTENSION, getSafeModeStatus());
 
     // stays in EXTENSION: pending extension period
+    Whitebox.setInternalState(bmSafeMode, "extension", Integer.MAX_VALUE);
     setSafeModeStatus(BMSafeModeStatus.EXTENSION);
     setBlockSafe(BLOCK_THRESHOLD);
-    Whitebox.setInternalState(bmSafeMode, "extension", Integer.MAX_VALUE);
     bmSafeMode.checkSafeMode();
     assertEquals(BMSafeModeStatus.EXTENSION, getSafeModeStatus());
   }


Mime
View raw message