hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From z..@apache.org
Subject [39/50] [abbrv] hadoop git commit: HDFS-7676. Fix TestFileTruncate to avoid bug of HDFS-7611. Contributed by Konstantin Shvachko.
Date Mon, 26 Jan 2015 17:44:54 GMT
HDFS-7676. Fix TestFileTruncate to avoid bug of HDFS-7611. Contributed by Konstantin Shvachko.


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

Branch: refs/heads/HDFS-EC
Commit: 38cbafd18cf18171ded4e4d0518d67be13145018
Parents: e461d62
Author: Konstantin V Shvachko <shv@apache.org>
Authored: Sat Jan 24 18:03:11 2015 -0800
Committer: Zhe Zhang <zhz@apache.org>
Committed: Mon Jan 26 09:43:30 2015 -0800

----------------------------------------------------------------------
 hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt                     | 2 ++
 .../apache/hadoop/hdfs/server/namenode/TestFileTruncate.java    | 5 +++++
 2 files changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/38cbafd1/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 21c8374..a6cbf8f 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -785,6 +785,8 @@ Release 2.7.0 - UNRELEASED
     HDFS-7659. truncate should check negative value of the new length.
     (Yi Liu via shv)
 
+    HDFS-7676. Fix TestFileTruncate to avoid bug of HDFS-7611. (shv)
+
 Release 2.6.1 - UNRELEASED
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/38cbafd1/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java
index 1612a24..e8250a2 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java
@@ -496,6 +496,11 @@ public class TestFileTruncate {
    */
   @Test
   public void testTruncateEditLogLoad() throws IOException {
+    // purge previously accumulated edits
+    fs.setSafeMode(SafeModeAction.SAFEMODE_ENTER);
+    fs.saveNamespace();
+    fs.setSafeMode(SafeModeAction.SAFEMODE_LEAVE);
+
     int startingFileSize = 2 * BLOCK_SIZE + BLOCK_SIZE / 2;
     int toTruncate = 1;
     final String s = "/testTruncateEditLogLoad";


Mime
View raw message