You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Shardul Singh (Jira)" <ji...@apache.org> on 2019/09/06 09:46:00 UTC
[jira] [Commented] (HBASE-22980) HRegionPartioner getPartition()
method incorrectly partitions the regions of the table.
[ https://issues.apache.org/jira/browse/HBASE-22980?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16924094#comment-16924094 ]
Shardul Singh commented on HBASE-22980:
---------------------------------------
Solution:
Instead of
{code}
if (i >= numPartitions-1){
{code}
It should be
{code}
if (i >= numPartitions){
{code}
> HRegionPartioner getPartition() method incorrectly partitions the regions of the table.
> ---------------------------------------------------------------------------------------
>
> Key: HBASE-22980
> URL: https://issues.apache.org/jira/browse/HBASE-22980
> Project: HBase
> Issue Type: Bug
> Components: mapreduce
> Reporter: Shardul Singh
> Assignee: Shardul Singh
> Priority: Minor
>
> In HRegionPartitioner getPartition(), the case where we have less reduces than region is incorrect.
> [https://github.com/apache/hbase/blob/fbd5b5e32753104f88600b0f4c803ab5659bce64/hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/HRegionPartitioner.java#L92]
> Consider the following scenario:
> # if there are 5 regions for the table, partitions = 5 and number of reducers is also 5.
> So in this case above code should not return true. But for the last region when i=4, getPartition should return 4 but it returns 2 because it falls in the case of when we have less reduces than region and returns true for the above condition.
> {code:java}
> {code}
--
This message was sent by Atlassian Jira
(v8.3.2#803003)