BATCH-1757: Fixed max calculation

This commit is contained in:
Michael Minella
2013-02-05 09:38:38 -06:00
parent bea04ce186
commit 47d07b0326

View File

@@ -35,7 +35,7 @@ public class MinMaxPartitioner extends SimplePartitioner {
int i = 0;
for (ExecutionContext context : partition.values()) {
int min = (i++)*range;
int max = Math.min(total, (min+1)*range);
int max = Math.min(total, i * range);
context.putInt("min", min);
context.putInt("max", max);
}