You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by en...@apache.org on 2015/01/05 20:17:25 UTC
hbase git commit: HBASE-12799 ITAG fails with
java.lang.RuntimeException if table does not exist
Repository: hbase
Updated Branches:
refs/heads/master 2ba605316 -> 24bcebdee
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/24bcebde
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/24bcebde
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/24bcebde
Branch: refs/heads/master
Commit: 24bcebdeeb5c8025a1171fd73b5f38e666ae819b
Parents: 2ba6053
Author: Enis Soztutar <en...@apache.org>
Authored: Mon Jan 5 11:14:40 2015 -0800
Committer: Enis Soztutar <en...@apache.org>
Committed: Mon Jan 5 11:14:40 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/24bcebde/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/24bcebde/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 81e8d0b..3038ad7 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<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();
+ }
+ });
+ }
}
/**