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:37:00 UTC

[jira] [Updated] (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:all-tabpanel ]

Shardul Singh updated HBASE-22980:
----------------------------------
    Component/s: mapreduce

> 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
>         Environment: Instead of
> {code:java}
> if(i >= numPartitions-1) 
> {code}
> It should be
> {code:java}
> if(i >= numPartitions) 
> {code}
>            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:
> 1. 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. 



--
This message was sent by Atlassian Jira
(v8.3.2#803003)