From 4b541d63804e752f536560f7d96e222c0ffd877c Mon Sep 17 00:00:00 2001 From: Michael Stack Date: Fri, 10 Mar 2017 19:50:53 -0800 Subject: [PATCH] HBASE-17772 IntegrationTestRSGroup won't run --- .../hadoop/hbase/rsgroup/IntegrationTestRSGroup.java | 4 ++-- .../apache/hadoop/hbase/rsgroup/TestRSGroupsBase.java | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/rsgroup/IntegrationTestRSGroup.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/rsgroup/IntegrationTestRSGroup.java index 6b1f1a772a9..5c099c89731 100644 --- a/hbase-it/src/test/java/org/apache/hadoop/hbase/rsgroup/IntegrationTestRSGroup.java +++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/rsgroup/IntegrationTestRSGroup.java @@ -25,7 +25,7 @@ import org.apache.hadoop.hbase.IntegrationTestingUtility; import org.apache.hadoop.hbase.Waiter; import org.apache.hadoop.hbase.testclassification.IntegrationTests; import org.junit.After; -import org.junit.BeforeClass; +import org.junit.Before; import org.junit.experimental.categories.Category; /** @@ -37,7 +37,7 @@ public class IntegrationTestRSGroup extends TestRSGroupsBase { private final static Log LOG = LogFactory.getLog(IntegrationTestRSGroup.class); private static boolean initialized = false; - @BeforeClass + @Before public void beforeMethod() throws Exception { if(!initialized) { LOG.info("Setting up IntegrationTestRSGroup"); diff --git a/hbase-rsgroup/src/test/java/org/apache/hadoop/hbase/rsgroup/TestRSGroupsBase.java b/hbase-rsgroup/src/test/java/org/apache/hadoop/hbase/rsgroup/TestRSGroupsBase.java index 5f9116b6407..59853a56c74 100644 --- a/hbase-rsgroup/src/test/java/org/apache/hadoop/hbase/rsgroup/TestRSGroupsBase.java +++ b/hbase-rsgroup/src/test/java/org/apache/hadoop/hbase/rsgroup/TestRSGroupsBase.java @@ -162,7 +162,14 @@ public abstract class TestRSGroupsBase { ClusterStatus status = TEST_UTIL.getHBaseClusterInterface().getClusterStatus(); for(ServerName serverName : status.getServers()) { for(RegionLoad rl : status.getLoad(serverName).getRegionsLoad().values()) { - TableName tableName = HRegionInfo.getTable(rl.getName()); + TableName tableName = null; + try { + tableName = HRegionInfo.getTable(rl.getName()); + } catch (IllegalArgumentException e) { + LOG.warn("Failed parse a table name from regionname=" + + Bytes.toStringBinary(rl.getName())); + continue; + } if(!map.containsKey(tableName)) { map.put(tableName, new TreeMap<>()); }