You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by ki...@apache.org on 2016/02/03 19:53:09 UTC

hadoop git commit: HDFS-9743. Fix TestLazyPersistFiles#testFallbackToDiskFull in branch-2.7. Contributed by Kihwal Lee.

Repository: hadoop
Updated Branches:
  refs/heads/branch-2.7 5131ee56a -> dd11c8274


HDFS-9743. Fix TestLazyPersistFiles#testFallbackToDiskFull in branch-2.7. Contributed by Kihwal Lee.


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

Branch: refs/heads/branch-2.7
Commit: dd11c8274dede96a7687cc48edee5df8aa65c9b4
Parents: 5131ee5
Author: Kihwal Lee <ki...@apache.org>
Authored: Wed Feb 3 12:51:01 2016 -0600
Committer: Kihwal Lee <ki...@apache.org>
Committed: Wed Feb 3 12:51:01 2016 -0600

----------------------------------------------------------------------
 hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt                   | 2 ++
 .../server/datanode/fsdataset/impl/LazyPersistTestCase.java   | 7 +++++++
 2 files changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/dd11c827/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 2a6c0d7..634a58b 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -81,6 +81,8 @@ Release 2.7.3 - UNRELEASED
     HDFS-9406. FSImage may get corrupted after deleting snapshot.
     (Contributed by Jing Zhao, Stanislav Antic, Vinayakumar B, Yongjun Zhang)
 
+    HDFS-9743. Fix TestLazyPersistFiles#testFallbackToDiskFull (kihwal)
+
     HDFS-9740. Use a reasonable limit in DFSTestUtil.waitForMetric()
     (Chang Li via vinayakumarb)
 

http://git-wip-us.apache.org/repos/asf/hadoop/blob/dd11c827/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/LazyPersistTestCase.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/LazyPersistTestCase.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/LazyPersistTestCase.java
index 89a70c9..02753e9 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/LazyPersistTestCase.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/LazyPersistTestCase.java
@@ -47,6 +47,7 @@ import org.junit.rules.Timeout;
 import java.io.File;
 import java.io.IOException;
 import java.util.Arrays;
+import java.util.concurrent.TimeoutException;
 import java.util.EnumSet;
 import java.util.List;
 import java.util.HashSet;
@@ -401,6 +402,7 @@ public abstract class LazyPersistTestCase {
 
   protected final void verifyRamDiskJMXMetric(String metricName,
       long expectedValue) throws Exception {
+    waitForMetric(metricName, (int)expectedValue);
     assertEquals(expectedValue, Integer.parseInt(jmx.getValue(metricName)));
   }
 
@@ -428,4 +430,9 @@ public abstract class LazyPersistTestCase {
       e.printStackTrace();
     }
   }
+
+  protected void waitForMetric(final String metricName, final int expectedValue)
+      throws TimeoutException, InterruptedException {
+    DFSTestUtil.waitForMetric(jmx, metricName, expectedValue);
+  }
 }