From da05873e0e6f8a5f678c0b3d20a9f75da936edbd Mon Sep 17 00:00:00 2001 From: Tsz-wo Sze Date: Thu, 16 May 2013 02:00:03 +0000 Subject: [PATCH] HDFS-4826. TestNestedSnapshots times out due to repeated slow edit log flushes when running on virtualized disk. Contributed by Chris Nauroth git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1483150 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../hdfs/server/namenode/snapshot/TestNestedSnapshots.java | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index d86388a9a8d..e1e8b87e14a 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -144,6 +144,9 @@ Trunk (Unreleased) HDFS-347. DFS read performance suboptimal when client co-located on nodes with data. (Colin Patrick McCabe via todd and atm) + HDFS-4826. TestNestedSnapshots times out due to repeated slow edit log + flushes when running on virtualized disk. (Chris Nauroth via szetszwo) + OPTIMIZATIONS BUG FIXES diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestNestedSnapshots.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestNestedSnapshots.java index 6885490aee9..0197608a6c1 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestNestedSnapshots.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestNestedSnapshots.java @@ -36,6 +36,7 @@ import org.apache.hadoop.hdfs.DistributedFileSystem; import org.apache.hadoop.hdfs.MiniDFSCluster; import org.apache.hadoop.hdfs.protocol.HdfsConstants; import org.apache.hadoop.hdfs.protocol.NSQuotaExceededException; +import org.apache.hadoop.hdfs.server.namenode.EditLogFileOutputStream; import org.apache.hadoop.hdfs.server.namenode.FSDirectory; import org.apache.hadoop.hdfs.server.namenode.INode; import org.apache.hadoop.hdfs.server.namenode.INodeDirectory; @@ -48,6 +49,12 @@ import org.junit.Test; /** Testing nested snapshots. */ public class TestNestedSnapshots { + static { + // These tests generate a large number of edits, and repeated edit log + // flushes can be a bottleneck. + EditLogFileOutputStream.setShouldSkipFsyncForTesting(true); + } + { SnapshotTestHelper.disableLogs(); }