Documentation
¶
Index ¶
- type ScheduleOptions
- func (mso *ScheduleOptions) CheckLabelProperty(typ string, labels []*metapb.StoreLabel) bool
- func (mso *ScheduleOptions) GetHighSpaceRatio() float64
- func (mso *ScheduleOptions) GetHotRegionCacheHitsThreshold() int
- func (mso *ScheduleOptions) GetHotRegionScheduleLimit() uint64
- func (mso *ScheduleOptions) GetKeyType() core.KeyType
- func (mso *ScheduleOptions) GetLeaderScheduleLimit() uint64
- func (mso *ScheduleOptions) GetLeaderSchedulePolicy() core.SchedulePolicy
- func (mso *ScheduleOptions) GetLocationLabels() []string
- func (mso *ScheduleOptions) GetLowSpaceRatio() float64
- func (mso *ScheduleOptions) GetMaxMergeRegionKeys() uint64
- func (mso *ScheduleOptions) GetMaxMergeRegionSize() uint64
- func (mso *ScheduleOptions) GetMaxPendingPeerCount() uint64
- func (mso *ScheduleOptions) GetMaxReplicas() int
- func (mso *ScheduleOptions) GetMaxSnapshotCount() uint64
- func (mso *ScheduleOptions) GetMaxStoreDownTime() time.Duration
- func (mso *ScheduleOptions) GetMergeScheduleLimit() uint64
- func (mso *ScheduleOptions) GetRegionScheduleLimit() uint64
- func (mso *ScheduleOptions) GetReplicaScheduleLimit() uint64
- func (mso *ScheduleOptions) GetSchedulerMaxWaitingOperator() uint64
- func (mso *ScheduleOptions) GetSplitMergeInterval() time.Duration
- func (mso *ScheduleOptions) GetStoreLimitByType(storeID uint64, typ storelimit.Type) float64
- func (mso *ScheduleOptions) GetStrictlyMatchLabel() bool
- func (mso *ScheduleOptions) GetTolerantSizeRatio() float64
- func (mso *ScheduleOptions) IsCrossTableMergeEnabled() bool
- func (mso *ScheduleOptions) IsDebugMetricsEnabled() bool
- func (mso *ScheduleOptions) IsLocationReplacementEnabled() bool
- func (mso *ScheduleOptions) IsMakeUpReplicaEnabled() bool
- func (mso *ScheduleOptions) IsOneWayMergeEnabled() bool
- func (mso *ScheduleOptions) IsPlacementRulesEnabled() bool
- func (mso *ScheduleOptions) IsRemoveDownReplicaEnabled() bool
- func (mso *ScheduleOptions) IsRemoveExtraReplicaEnabled() bool
- func (mso *ScheduleOptions) IsReplaceOfflineReplicaEnabled() bool
- func (mso *ScheduleOptions) SetAllStoresLimit(typ storelimit.Type, ratePerMin float64)
- func (mso *ScheduleOptions) SetMaxReplicas(replicas int)
- func (mso *ScheduleOptions) SetStoreLimit(storeID uint64, typ storelimit.Type, ratePerMin float64)
- type StoreLimitConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ScheduleOptions ¶
type ScheduleOptions struct {
RegionScheduleLimit uint64
LeaderScheduleLimit uint64
ReplicaScheduleLimit uint64
MergeScheduleLimit uint64
HotRegionScheduleLimit uint64
StoreLimit map[uint64]StoreLimitConfig
MaxSnapshotCount uint64
MaxPendingPeerCount uint64
MaxMergeRegionSize uint64
MaxMergeRegionKeys uint64
SchedulerMaxWaitingOperator uint64
SplitMergeInterval time.Duration
EnableOneWayMerge bool
EnableCrossTableMerge bool
KeyType string
MaxStoreDownTime time.Duration
MaxReplicas int
LocationLabels []string
StrictlyMatchLabel bool
HotRegionCacheHitsThreshold int
TolerantSizeRatio float64
LowSpaceRatio float64
HighSpaceRatio float64
StoreLimitMode string
EnableRemoveDownReplica bool
EnableReplaceOfflineReplica bool
EnableMakeUpReplica bool
EnableRemoveExtraReplica bool
EnableLocationReplacement bool
EnablePlacementRules bool
EnableDebugMetrics bool
DisableRemoveDownReplica bool
DisableReplaceOfflineReplica bool
DisableMakeUpReplica bool
DisableRemoveExtraReplica bool
DisableLocationReplacement bool
LeaderSchedulePolicy string
LabelProperties map[string][]*metapb.StoreLabel
}
ScheduleOptions is a mock of ScheduleOptions which implements Options interface
func NewScheduleOptions ¶
func NewScheduleOptions() *ScheduleOptions
NewScheduleOptions creates a mock schedule option.
func (*ScheduleOptions) CheckLabelProperty ¶ added in v4.0.2
func (mso *ScheduleOptions) CheckLabelProperty(typ string, labels []*metapb.StoreLabel) bool
CheckLabelProperty mocks method
func (*ScheduleOptions) GetHighSpaceRatio ¶
func (mso *ScheduleOptions) GetHighSpaceRatio() float64
GetHighSpaceRatio mocks method
func (*ScheduleOptions) GetHotRegionCacheHitsThreshold ¶
func (mso *ScheduleOptions) GetHotRegionCacheHitsThreshold() int
GetHotRegionCacheHitsThreshold mocks method
func (*ScheduleOptions) GetHotRegionScheduleLimit ¶
func (mso *ScheduleOptions) GetHotRegionScheduleLimit() uint64
GetHotRegionScheduleLimit mocks method
func (*ScheduleOptions) GetKeyType ¶
func (mso *ScheduleOptions) GetKeyType() core.KeyType
GetKeyType is to get key type.
func (*ScheduleOptions) GetLeaderScheduleLimit ¶
func (mso *ScheduleOptions) GetLeaderScheduleLimit() uint64
GetLeaderScheduleLimit mocks method
func (*ScheduleOptions) GetLeaderSchedulePolicy ¶
func (mso *ScheduleOptions) GetLeaderSchedulePolicy() core.SchedulePolicy
GetLeaderSchedulePolicy is to get leader schedule policy.
func (*ScheduleOptions) GetLocationLabels ¶
func (mso *ScheduleOptions) GetLocationLabels() []string
GetLocationLabels mocks method
func (*ScheduleOptions) GetLowSpaceRatio ¶
func (mso *ScheduleOptions) GetLowSpaceRatio() float64
GetLowSpaceRatio mocks method
func (*ScheduleOptions) GetMaxMergeRegionKeys ¶
func (mso *ScheduleOptions) GetMaxMergeRegionKeys() uint64
GetMaxMergeRegionKeys mocks method
func (*ScheduleOptions) GetMaxMergeRegionSize ¶
func (mso *ScheduleOptions) GetMaxMergeRegionSize() uint64
GetMaxMergeRegionSize mocks method
func (*ScheduleOptions) GetMaxPendingPeerCount ¶
func (mso *ScheduleOptions) GetMaxPendingPeerCount() uint64
GetMaxPendingPeerCount mocks method
func (*ScheduleOptions) GetMaxReplicas ¶
func (mso *ScheduleOptions) GetMaxReplicas() int
GetMaxReplicas mocks method
func (*ScheduleOptions) GetMaxSnapshotCount ¶
func (mso *ScheduleOptions) GetMaxSnapshotCount() uint64
GetMaxSnapshotCount mocks method
func (*ScheduleOptions) GetMaxStoreDownTime ¶
func (mso *ScheduleOptions) GetMaxStoreDownTime() time.Duration
GetMaxStoreDownTime mocks method
func (*ScheduleOptions) GetMergeScheduleLimit ¶
func (mso *ScheduleOptions) GetMergeScheduleLimit() uint64
GetMergeScheduleLimit mocks method
func (*ScheduleOptions) GetRegionScheduleLimit ¶
func (mso *ScheduleOptions) GetRegionScheduleLimit() uint64
GetRegionScheduleLimit mocks method
func (*ScheduleOptions) GetReplicaScheduleLimit ¶
func (mso *ScheduleOptions) GetReplicaScheduleLimit() uint64
GetReplicaScheduleLimit mocks method
func (*ScheduleOptions) GetSchedulerMaxWaitingOperator ¶
func (mso *ScheduleOptions) GetSchedulerMaxWaitingOperator() uint64
GetSchedulerMaxWaitingOperator mocks method.
func (*ScheduleOptions) GetSplitMergeInterval ¶
func (mso *ScheduleOptions) GetSplitMergeInterval() time.Duration
GetSplitMergeInterval mocks method
func (*ScheduleOptions) GetStoreLimitByType ¶ added in v4.0.2
func (mso *ScheduleOptions) GetStoreLimitByType(storeID uint64, typ storelimit.Type) float64
GetStoreLimitByType mocks method
func (*ScheduleOptions) GetStrictlyMatchLabel ¶
func (mso *ScheduleOptions) GetStrictlyMatchLabel() bool
GetStrictlyMatchLabel mocks method
func (*ScheduleOptions) GetTolerantSizeRatio ¶
func (mso *ScheduleOptions) GetTolerantSizeRatio() float64
GetTolerantSizeRatio mocks method
func (*ScheduleOptions) IsCrossTableMergeEnabled ¶
func (mso *ScheduleOptions) IsCrossTableMergeEnabled() bool
IsCrossTableMergeEnabled mocks method
func (*ScheduleOptions) IsDebugMetricsEnabled ¶
func (mso *ScheduleOptions) IsDebugMetricsEnabled() bool
IsDebugMetricsEnabled mocks method
func (*ScheduleOptions) IsLocationReplacementEnabled ¶
func (mso *ScheduleOptions) IsLocationReplacementEnabled() bool
IsLocationReplacementEnabled mocks method.
func (*ScheduleOptions) IsMakeUpReplicaEnabled ¶
func (mso *ScheduleOptions) IsMakeUpReplicaEnabled() bool
IsMakeUpReplicaEnabled mocks method.
func (*ScheduleOptions) IsOneWayMergeEnabled ¶
func (mso *ScheduleOptions) IsOneWayMergeEnabled() bool
IsOneWayMergeEnabled mocks method
func (*ScheduleOptions) IsPlacementRulesEnabled ¶
func (mso *ScheduleOptions) IsPlacementRulesEnabled() bool
IsPlacementRulesEnabled mocks method
func (*ScheduleOptions) IsRemoveDownReplicaEnabled ¶
func (mso *ScheduleOptions) IsRemoveDownReplicaEnabled() bool
IsRemoveDownReplicaEnabled mocks method.
func (*ScheduleOptions) IsRemoveExtraReplicaEnabled ¶
func (mso *ScheduleOptions) IsRemoveExtraReplicaEnabled() bool
IsRemoveExtraReplicaEnabled mocks method.
func (*ScheduleOptions) IsReplaceOfflineReplicaEnabled ¶
func (mso *ScheduleOptions) IsReplaceOfflineReplicaEnabled() bool
IsReplaceOfflineReplicaEnabled mocks method.
func (*ScheduleOptions) SetAllStoresLimit ¶ added in v4.0.2
func (mso *ScheduleOptions) SetAllStoresLimit(typ storelimit.Type, ratePerMin float64)
SetAllStoresLimit mocks method
func (*ScheduleOptions) SetMaxReplicas ¶
func (mso *ScheduleOptions) SetMaxReplicas(replicas int)
SetMaxReplicas mocks method
func (*ScheduleOptions) SetStoreLimit ¶ added in v4.0.2
func (mso *ScheduleOptions) SetStoreLimit(storeID uint64, typ storelimit.Type, ratePerMin float64)
SetStoreLimit mocks method
type StoreLimitConfig ¶ added in v4.0.2
type StoreLimitConfig struct {
AddPeer float64 `toml:"add-peer" json:"add-peer"`
RemovePeer float64 `toml:"remove-peer" json:"remove-peer"`
}
StoreLimitConfig is a mock of StoreLimitConfig.