HBASE-19461 TestRSGroups is broke

This commit is contained in:
Michael Stack 2017-12-08 13:02:18 -08:00
parent 07b193ae4f
commit 542060ce40
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;
}
}
if (offset <= 0) {
throw new IllegalArgumentException("offset=" + offset);
}
byte[] buff = new byte[offset];
System.arraycopy(regionName, 0, buff, 0, offset);
return TableName.valueOf(buff);

View File

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