hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zhihong Yu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-5848) Create table with EMPTY_START_ROW passed as splitKey causes the HMaster to abort
Date Tue, 24 Apr 2012 22:04:05 GMT

    [ https://issues.apache.org/jira/browse/HBASE-5848?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13261068#comment-13261068
] 

Zhihong Yu commented on HBASE-5848:
-----------------------------------

I modified testCreateTableWithEmptyRowInTheSplitKeys using the above pattern and master didn't
crash (with addendum):
{code}
Index: src/test/java/org/apache/hadoop/hbase/client/TestAdmin.java
===================================================================
--- src/test/java/org/apache/hadoop/hbase/client/TestAdmin.java	(revision 1330037)
+++ src/test/java/org/apache/hadoop/hbase/client/TestAdmin.java	(working copy)
@@ -733,15 +733,13 @@
   @Test
   public void testCreateTableWithEmptyRowInTheSplitKeys() throws IOException{
     byte[] tableName = Bytes.toBytes("testCreateTableWithEmptyRowInTheSplitKeys");
-    byte[][] splitKeys = new byte[3][];
-    splitKeys[0] = "region1".getBytes();
-    splitKeys[1] = HConstants.EMPTY_BYTE_ARRAY;
-    splitKeys[2] = "region2".getBytes();
+    byte[][] splitKeys = new byte[2][];
+    splitKeys[0] = HConstants.EMPTY_BYTE_ARRAY;
+    splitKeys[1] = "region2".getBytes();
     HTableDescriptor desc = new HTableDescriptor(tableName);
     desc.addFamily(new HColumnDescriptor("col"));
     try {
       admin.createTable(desc, splitKeys);
-      fail("Test case should fail as empty split key is passed.");
     } catch (IllegalArgumentException e) {
     }
   }
{code}
                
> Create table with EMPTY_START_ROW passed as splitKey causes the HMaster to abort
> --------------------------------------------------------------------------------
>
>                 Key: HBASE-5848
>                 URL: https://issues.apache.org/jira/browse/HBASE-5848
>             Project: HBase
>          Issue Type: Bug
>          Components: client
>            Reporter: Lars Hofhansl
>            Assignee: ramkrishna.s.vasudevan
>            Priority: Minor
>             Fix For: 0.94.0, 0.96.0
>
>         Attachments: 5848-addendum-v2.txt, 5848-addendum-v3.txt, HBASE-5848.patch, HBASE-5848.patch,
HBASE-5848_0.94.patch, HBASE-5848_addendum.patch
>
>
> A coworker of mine just had this scenario. It does not make sense the EMPTY_START_ROW
as splitKey (since the region with the empty start key is implicit), but it should not cause
the HMaster to abort.
> The abort happens because it tries to bulk assign the same region twice and then runs
into race conditions with ZK.
> The same would (presumably) happen when two identical split keys are passed, but the
client blocks that. The simplest solution here is to also block passed null or EMPTY_START_ROW
as split key by the client.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message