hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject hbase git commit: HBASE-19461 TestRSGroups is broke
Date Fri, 08 Dec 2017 23:09:56 GMT
Repository: hbase
Updated Branches:
  refs/heads/master 07b193ae4 -> 542060ce4


HBASE-19461 TestRSGroups is broke


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/542060ce
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/542060ce
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/542060ce

Branch: refs/heads/master
Commit: 542060ce4033428bc0bc56890bc3e3dfd84792ee
Parents: 07b193a
Author: Michael Stack <stack@apache.org>
Authored: Fri Dec 8 13:02:18 2017 -0800
Committer: Michael Stack <stack@apache.org>
Committed: Fri Dec 8 15:09:46 2017 -0800

----------------------------------------------------------------------
 .../src/main/java/org/apache/hadoop/hbase/client/RegionInfo.java  | 3 +++
 .../test/java/org/apache/hadoop/hbase/rsgroup/TestRSGroups.java   | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/542060ce/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RegionInfo.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RegionInfo.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RegionInfo.java
index cfca6da..0cb4114 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RegionInfo.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RegionInfo.java
@@ -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);

http://git-wip-us.apache.org/repos/asf/hbase/blob/542060ce/hbase-rsgroup/src/test/java/org/apache/hadoop/hbase/rsgroup/TestRSGroups.java
----------------------------------------------------------------------
diff --git a/hbase-rsgroup/src/test/java/org/apache/hadoop/hbase/rsgroup/TestRSGroups.java
b/hbase-rsgroup/src/test/java/org/apache/hadoop/hbase/rsgroup/TestRSGroups.java
index 9a58097..f2ae112 100644
--- a/hbase-rsgroup/src/test/java/org/apache/hadoop/hbase/rsgroup/TestRSGroups.java
+++ b/hbase-rsgroup/src/test/java/org/apache/hadoop/hbase/rsgroup/TestRSGroups.java
@@ -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));


Mime
View raw message