老师,你的Partition好像只分了numPartitions-1个区?
for (int i = 0; i < numPartitions; i++) {
if (keynumber < bound * i && keynumber >= bound * (i - 1))
return i - 1;
}
改为 i <= numPartitions
for (int i = 0; i < numPartitions; i++) {
if (keynumber < bound * i && keynumber >= bound * (i - 1))
return i - 1;
}
改为 i <= numPartitions
2015-11-24
举报