You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2019/09/06 09:51:04 UTC

[GitHub] [hbase] shardul-cr7 opened a new pull request #590: HBASE-22980 HRegionPartioner getPartition() method incorrectly partitions the regions of the table.

shardul-cr7 opened a new pull request #590: HBASE-22980 HRegionPartioner getPartition() method incorrectly partitions the regions of the table.
URL: https://github.com/apache/hbase/pull/590
 
 
   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.
    
   Solution:
   Instead of
   
          if (i >= numPartitions-1){ 
   It should be
   
          if (i >= numPartitions){ 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services