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

Edward C. Skoviak commented on HBASE-8170:
------------------------------------------

Perhaps I am wrong, but as I understand it each splitKey defines the border 
where the split happens. So in this scenario the three regions would be 
everything before startKey, startKey to endKey, and then everything after 
endKey. The other createTable() function, which is called at the end of this 
function, works that way. This can be verified by calling it with two keys and 
calling HTable.getRegionLocations().size() and getting a return value of 3. So 
if we did numRegions - 2 we would always be getting an additional region (so in 
this case, 4).
                
> HbaseAdmin.createTable cannot handle creating three regions
> -----------------------------------------------------------
>
>                 Key: HBASE-8170
>                 URL: https://issues.apache.org/jira/browse/HBASE-8170
>             Project: HBase
>          Issue Type: Bug
>          Components: Admin
>    Affects Versions: 0.94.5
>            Reporter: Edward C. Skoviak
>            Priority: Minor
>
> createTable(HTableDescriptor desc, byte [] startKey, byte [] endKey, int 
> numRegions) (line #370) dictates that you must specify a minimum of three 
> regions, however is not able to handle being fed a value three. This is a 
> result of line #379 where it attempts to create the key splits, and calls 
> Bytes.Split with a value of 0 for the third parameter. createTable should 
> instead just create a byte[][] with the startKey and endKey in this scenario.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to