diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/SimpleTotalOrderPartitioner.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/SimpleTotalOrderPartitioner.java index 1c650689348..4cc7a8a57cf 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/SimpleTotalOrderPartitioner.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/SimpleTotalOrderPartitioner.java @@ -106,6 +106,7 @@ implements Configurable { for (int i = 0; i < splits.length; i++) { LOG.info(Bytes.toStringBinary(splits[i])); } + this.lastReduces = reduces; } int pos = Bytes.binarySearch(this.splits, key.get(), key.getOffset(), key.getLength(), Bytes.BYTES_RAWCOMPARATOR); @@ -138,5 +139,7 @@ implements Configurable { } LOG.info("startkey=" + Bytes.toStringBinary(startkey) + ", endkey=" + Bytes.toStringBinary(endkey)); + // Reset last reduces count on change of Start / End key + this.lastReduces = -1; } }