Documentation ¶
Index ¶
- type RegionSplitter
- func (rs *RegionSplitter) ExecuteSplit(ctx context.Context, sortedSplitKeys [][]byte) error
- func (rs *RegionSplitter) SplitWaitAndScatter(ctx context.Context, region *split.RegionInfo, keys [][]byte) ([]*split.RegionInfo, error)
- func (rs *RegionSplitter) WaitForScatterRegionsTimeout(ctx context.Context, regionInfos []*split.RegionInfo, timeout time.Duration) int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RegionSplitter ¶
type RegionSplitter struct {
// contains filtered or unexported fields
}
RegionSplitter is a executor of region split by rules.
func NewRegionSplitter ¶
func NewRegionSplitter(client split.SplitClient) *RegionSplitter
NewRegionSplitter returns a new RegionSplitter.
func (*RegionSplitter) ExecuteSplit ¶
func (rs *RegionSplitter) ExecuteSplit( ctx context.Context, sortedSplitKeys [][]byte, ) error
ExecuteSplit executes regions split and make sure new splitted regions are balance. It will split regions by the rewrite rules, then it will split regions by the end key of each range. tableRules includes the prefix of a table, since some ranges may have a prefix with record sequence or index sequence. note: all ranges and rewrite rules must have raw key.
func (*RegionSplitter) SplitWaitAndScatter ¶
func (rs *RegionSplitter) SplitWaitAndScatter(ctx context.Context, region *split.RegionInfo, keys [][]byte) ([]*split.RegionInfo, error)
SplitWaitAndScatter expose the function `SplitWaitAndScatter` of split client.
func (*RegionSplitter) WaitForScatterRegionsTimeout ¶
func (rs *RegionSplitter) WaitForScatterRegionsTimeout(ctx context.Context, regionInfos []*split.RegionInfo, timeout time.Duration) int
Click to show internal directories.
Click to hide internal directories.