Shardul Singh created HBASE-22980: ------------------------------------- Summary: 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 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
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)