KeyRange range = KeyRange.getKeyRange(region.getRegionInfo().getStartKey(), region.getRegionInfo().getEndKey());
if (tableRef.getTable().getBucketNum() != null) {
// Add salt byte, as minMaxRange won't have it
minMaxRange = SaltingUtil.addSaltByte(region.getRegionInfo().getStartKey(), minMaxRange);
}
range = range.intersect(minMaxRange);
return ranges.intersect(range.getLowerRange(), range.getUpperRange());
}
return ranges.intersect(region.getRegionInfo().getStartKey(), region.getRegionInfo().getEndKey());
}
});