hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject git commit: HBASE-11621 Make MiniDFSCluster run faster
Date Thu, 31 Jul 2014 16:42:36 GMT
Repository: hbase
Updated Branches:
  refs/heads/0.98 61de4e478 -> 464aaa7ee


HBASE-11621 Make MiniDFSCluster run faster


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

Branch: refs/heads/0.98
Commit: 464aaa7ee712f89bb24fa2a76836f06cd3ffe539
Parents: 61de4e4
Author: Ted Yu <tedyu@apache.org>
Authored: Thu Jul 31 16:42:20 2014 +0000
Committer: Ted Yu <tedyu@apache.org>
Committed: Thu Jul 31 16:42:20 2014 +0000

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hbase/HBaseTestingUtility.java    | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/464aaa7e/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
index 6e7a5ee..1b7dac5 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
@@ -24,6 +24,7 @@ import java.io.File;
 import java.io.IOException;
 import java.io.OutputStream;
 import java.lang.reflect.Field;
+import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
 import java.net.InetAddress;
 import java.net.ServerSocket;
@@ -506,6 +507,13 @@ public class HBaseTestingUtility extends HBaseCommonTestingUtility {
   public MiniDFSCluster startMiniDFSCluster(int servers, final String hosts[])
   throws Exception {
     createDirsAndSetProperties();
+    try {
+      Method m = Class.forName("org.apache.hadoop.hdfs.server.namenode.EditLogFileOutputStream")
+          .getMethod("setShouldSkipFsyncForTesting", new Class<?> []{ boolean.class
});
+      m.invoke(null, new Object[] {true});
+    } catch (ClassNotFoundException e) {
+      LOG.info("EditLogFileOutputStream not found");
+    }
 
     // Error level to skip some warnings specific to the minicluster. See HBASE-4709
     org.apache.log4j.Logger.getLogger(org.apache.hadoop.metrics2.util.MBeans.class).


Mime
View raw message