HBASE-17772 IntegrationTestRSGroup won't run

This commit is contained in:
Michael Stack 2017-03-10 19:50:53 -08:00
parent e0365df9d6
commit 4b541d6380
2 changed files with 10 additions and 3 deletions

View File

@ -25,7 +25,7 @@ import org.apache.hadoop.hbase.IntegrationTestingUtility;
import org.apache.hadoop.hbase.Waiter; import org.apache.hadoop.hbase.Waiter;
import org.apache.hadoop.hbase.testclassification.IntegrationTests; import org.apache.hadoop.hbase.testclassification.IntegrationTests;
import org.junit.After; import org.junit.After;
import org.junit.BeforeClass; import org.junit.Before;
import org.junit.experimental.categories.Category; 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 final static Log LOG = LogFactory.getLog(IntegrationTestRSGroup.class);
private static boolean initialized = false; private static boolean initialized = false;
@BeforeClass @Before
public void beforeMethod() throws Exception { public void beforeMethod() throws Exception {
if(!initialized) { if(!initialized) {
LOG.info("Setting up IntegrationTestRSGroup"); LOG.info("Setting up IntegrationTestRSGroup");

View File

@ -162,7 +162,14 @@ public abstract class TestRSGroupsBase {
ClusterStatus status = TEST_UTIL.getHBaseClusterInterface().getClusterStatus(); ClusterStatus status = TEST_UTIL.getHBaseClusterInterface().getClusterStatus();
for(ServerName serverName : status.getServers()) { for(ServerName serverName : status.getServers()) {
for(RegionLoad rl : status.getLoad(serverName).getRegionsLoad().values()) { 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)) { if(!map.containsKey(tableName)) {
map.put(tableName, new TreeMap<>()); map.put(tableName, new TreeMap<>());
} }