public class RangeSplitter extends Object
| 限定符和类型 | 类和说明 |
|---|---|
static class |
RangeSplitter.RegionTask |
| 限定符和类型 | 方法和说明 |
|---|---|
Map<Pair<TiRegion,Metapb.Store>,List<Handle>> |
groupByAndSortHandlesByRegionId(long tableId,
List<Handle> 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,
List<Handle> 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,Metapb.Store>,List<Handle>> groupByAndSortHandlesByRegionId(long tableId, List<Handle> handles)
tableId - Table id used for the handlehandles - Handle listpublic List<RangeSplitter.RegionTask> splitAndSortHandlesByRegion(List<Long> ids, List<Handle> 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 © 2022 PingCAP. All rights reserved.