public class RangeSplitter extends Object
Modifier and Type | Class and Description |
---|---|
static class |
RangeSplitter.RegionTask |
Modifier and Type | Method and Description |
---|---|
Map<Pair<TiRegion,TiStore>,gnu.trove.list.array.TLongArrayList> |
groupByAndSortHandlesByRegionId(long tableId,
gnu.trove.list.array.TLongArrayList handles)
Group by a list of handles by the handles' region, handles will be sorted.
|
static RangeSplitter |
newSplitter(RegionManager mgr) |
List<RangeSplitter.RegionTask> |
splitAndSortHandlesByRegion(List<Long> ids,
gnu.trove.list.array.TLongArrayList handles) |
List<RangeSplitter.RegionTask> |
splitRangeByRegion(List<Coprocessor.KeyRange> keyRanges)
Split key ranges into corresponding region tasks and group by their region id
|
List<RangeSplitter.RegionTask> |
splitRangeByRegion(List<Coprocessor.KeyRange> keyRanges,
TiStoreType storeType)
Split key ranges into corresponding region tasks and group by their region id
|
public static RangeSplitter newSplitter(RegionManager mgr)
public Map<Pair<TiRegion,TiStore>,gnu.trove.list.array.TLongArrayList> groupByAndSortHandlesByRegionId(long tableId, gnu.trove.list.array.TLongArrayList handles)
tableId
- Table id used for the handlehandles
- Handle list<Region, HandleList>
mappublic List<RangeSplitter.RegionTask> splitAndSortHandlesByRegion(List<Long> ids, gnu.trove.list.array.TLongArrayList handles)
public List<RangeSplitter.RegionTask> splitRangeByRegion(List<Coprocessor.KeyRange> keyRanges, TiStoreType storeType)
keyRanges
- List of key rangesstoreType
- Store type, null or TiKV for TiKV(leader), otherwise TiFlash(learner)public List<RangeSplitter.RegionTask> splitRangeByRegion(List<Coprocessor.KeyRange> keyRanges)
keyRanges
- List of key rangesCopyright © 2024 PingCAP. All rights reserved.