public class RegionSplitCalculator<R extends KeyRange>
This is a generic region split calculator. It requires Ranges that provide
start, end, and a comparator. It works in two phases -- the first adds ranges
and rejects backwards ranges. Then one calls calcRegions to generate the
multimap that has a start split key as a key and possibly multiple Ranges as
To traverse, one normally would get the split set, and iterate through the
calcRegions. Normal regions would have only one entry, holes would have zero,
and any overlaps would have multiple entries.
The interface is a bit cumbersome currently but is exposed this way so that
clients can choose how to iterate through the region splits.
Find specified number of top ranges in a big overlap group.
It could return less if there are not that many top ranges.
Once these top ranges are excluded, the big overlap group will
be broken into ranges with no overlapping, or smaller overlapped
groups, and most likely some holes.
bigOverlap - a list of ranges that overlap with each other