diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestAcidGuarantees.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestAcidGuarantees.java index 41ea388d5ea..acece95a57c 100644 --- a/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestAcidGuarantees.java +++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestAcidGuarantees.java @@ -17,28 +17,27 @@ */ package org.apache.hadoop.hbase; -import com.google.common.collect.Lists; import com.google.common.collect.Sets; import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.regionserver.ConstantSizeRegionSplitPolicy; import org.apache.hadoop.hbase.testclassification.IntegrationTests; -import org.apache.hadoop.hbase.util.Bytes; -import org.apache.hadoop.util.StringUtils; import org.apache.hadoop.util.ToolRunner; import org.junit.Test; import org.junit.experimental.categories.Category; -import java.io.IOException; -import java.util.List; -import java.util.Random; import java.util.Set; -import java.util.concurrent.atomic.AtomicLong; /** * This Integration Test verifies acid guarantees across column families by frequently writing * values to rows with multiple column families and concurrently reading entire rows that expect all * column families. + * + *

+ * Sample usage: + *

+ * hbase org.apache.hadoop.hbase.IntegrationTestAcidGuarantees -Dmillis=10000 -DnumWriters=50
+ * -DnumGetters=2 -DnumScanners=2 -DnumUniqueRows=5
+ * 
*/ @Category(IntegrationTests.class) public class IntegrationTestAcidGuarantees extends IntegrationTestBase { 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 81e8d0bd09e..3038ad766fc 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 @@ -3170,17 +3170,21 @@ public class HBaseTestingUtility extends HBaseCommonTestingUtility { } finally { meta.close(); } - // So, all regions are in the meta table but make sure master knows of the assignments before - // returing -- sometimes this can lag. - HMaster master = getHBaseCluster().getMaster(); - final RegionStates states = master.getAssignmentManager().getRegionStates(); - waitFor(timeout, 200, new Predicate() { - @Override - public boolean evaluate() throws IOException { - List hris = states.getRegionsOfTable(tableName); - return hris != null && !hris.isEmpty(); - } - }); + + // check from the master state if we are using a mini cluster + if (!getHBaseClusterInterface().isDistributedCluster()) { + // So, all regions are in the meta table but make sure master knows of the assignments before + // returing -- sometimes this can lag. + HMaster master = getHBaseCluster().getMaster(); + final RegionStates states = master.getAssignmentManager().getRegionStates(); + waitFor(timeout, 200, new Predicate() { + @Override + public boolean evaluate() throws IOException { + List hris = states.getRegionsOfTable(tableName); + return hris != null && !hris.isEmpty(); + } + }); + } } /**