Repository: hbase Updated Branches: refs/heads/branch-1 a14723b43 -> e7795007b
HBASE-12799 ITAG fails with java.lang.RuntimeException if table does not exist Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/e7795007 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/e7795007 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/e7795007 Branch: refs/heads/branch-1 Commit: e7795007b0b9bf270cd9df03c94a483104dd429b Parents: a14723b Author: Enis Soztutar <e...@apache.org> Authored: Mon Jan 5 11:14:40 2015 -0800 Committer: Enis Soztutar <e...@apache.org> Committed: Mon Jan 5 11:18:58 2015 -0800 ---------------------------------------------------------------------- .../hbase/IntegrationTestAcidGuarantees.java | 15 ++++++----- .../hadoop/hbase/HBaseTestingUtility.java | 26 +++++++++++--------- 2 files changed, 22 insertions(+), 19 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/e7795007/hbase-it/src/test/java/org/apache/hadoop/hbase/IntegrationTestAcidGuarantees.java ---------------------------------------------------------------------- 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 41ea388..acece95 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. + * + * <p> + * Sample usage: + * <pre> + * hbase org.apache.hadoop.hbase.IntegrationTestAcidGuarantees -Dmillis=10000 -DnumWriters=50 + * -DnumGetters=2 -DnumScanners=2 -DnumUniqueRows=5 + * </pre> */ @Category(IntegrationTests.class) public class IntegrationTestAcidGuarantees extends IntegrationTestBase { http://git-wip-us.apache.org/repos/asf/hbase/blob/e7795007/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 a7ac01d..711d0d5 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 @@ -3050,17 +3050,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<IOException>() { - @Override - public boolean evaluate() throws IOException { - List<HRegionInfo> 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<IOException>() { + @Override + public boolean evaluate() throws IOException { + List<HRegionInfo> hris = states.getRegionsOfTable(tableName); + return hris != null && !hris.isEmpty(); + } + }); + } } /**