Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-12717

Pre-split algorithm in HBaseAdmin.create() can not find the split point

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Duplicate
    • 0.98.6
    • 1.1.0, 2.0.0
    • Admin
    • None

    Description

      When we set the start key and the end key in the function:
      createTable(HTableDescriptor desc, byte[] startKey, byte[] endKey, int numRegions)
      The current pre-split algorithm could not find a split point between the keys like "aaa" and "aab", "1111" and "1112".

      Example Code for this bug:
      admin.createTable(htd, Bytes.toBytes("aaa"), Bytes.toBytes("aab"), 4);

      we will get the following ERROR:
      Exception in thread "main" java.lang.IllegalArgumentException: Unable to split key range into enough regions
      at org.apache.hadoop.hbase.client.HBaseAdmin.createTable(HBaseAdmin.java:473)
      at test.JavaTest.main(JavaTest.java:28)

      We hope this pre-split algorithm should be able to calculate the split point with an additional byte. for example:
      "aaa" and "aab", split point= "aaaP"
      "1111" and "1112", split point ="1111P"

      Attachments

        Issue Links

          Activity

            People

              yeweichen Weichen Ye
              yeweichen Weichen Ye
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: