HBASE-19461 TestRSGroups is broke

This commit is contained in:
Michael Stack 2017-12-08 13:02:18 -08:00
parent 3e6563d6e0
commit 3366ebdc56
No known key found for this signature in database
GPG Key ID: 9816C7FC8ACC93D2
2 changed files with 4 additions and 1 deletions

View File

@ -305,6 +305,9 @@ public interface RegionInfo {
break; break;
} }
} }
if (offset <= 0) {
throw new IllegalArgumentException("offset=" + offset);
}
byte[] buff = new byte[offset]; byte[] buff = new byte[offset];
System.arraycopy(regionName, 0, buff, 0, offset); System.arraycopy(regionName, 0, buff, 0, offset);
return TableName.valueOf(buff); return TableName.valueOf(buff);

View File

@ -186,7 +186,7 @@ public class TestRSGroups extends TestRSGroupsBase {
@Test @Test
public void testDefaultNamespaceCreateAndAssign() throws Exception { public void testDefaultNamespaceCreateAndAssign() throws Exception {
LOG.info("testDefaultNamespaceCreateAndAssign"); LOG.info("testDefaultNamespaceCreateAndAssign");
final byte[] tableName = Bytes.toBytes(tablePrefix + "_testCreateAndAssign"); String tableName = tablePrefix + "_testCreateAndAssign";
admin.modifyNamespace(NamespaceDescriptor.create("default") admin.modifyNamespace(NamespaceDescriptor.create("default")
.addConfiguration(RSGroupInfo.NAMESPACE_DESC_PROP_GROUP, "default").build()); .addConfiguration(RSGroupInfo.NAMESPACE_DESC_PROP_GROUP, "default").build());
final HTableDescriptor desc = new HTableDescriptor(TableName.valueOf(tableName)); final HTableDescriptor desc = new HTableDescriptor(TableName.valueOf(tableName));