Documentation ¶
Index ¶
- Constants
- func CheckAddPeer(c *check.C, op *schedule.Operator, kind schedule.OperatorKind, storeID uint64)
- func CheckTransferLeader(c *check.C, op *schedule.Operator, kind schedule.OperatorKind, ...)
- func CheckTransferPeer(c *check.C, op *schedule.Operator, kind schedule.OperatorKind, ...)
- type BalanceType
- type MockSchedulerOptions
- func (mso *MockSchedulerOptions) GetHotRegionLowThreshold() int
- func (mso *MockSchedulerOptions) GetLeaderScheduleLimit(name string) uint64
- func (mso *MockSchedulerOptions) GetLocationLabels() []string
- func (mso *MockSchedulerOptions) GetMaxPendingPeerCount() uint64
- func (mso *MockSchedulerOptions) GetMaxReplicas(name string) int
- func (mso *MockSchedulerOptions) GetMaxSnapshotCount() uint64
- func (mso *MockSchedulerOptions) GetMaxStoreDownTime() time.Duration
- func (mso *MockSchedulerOptions) GetRegionScheduleLimit(name string) uint64
- func (mso *MockSchedulerOptions) GetReplicaScheduleLimit(name string) uint64
- func (mso *MockSchedulerOptions) GetTolerantSizeRatio() float64
- func (mso *MockSchedulerOptions) SetMaxReplicas(replicas int)
Constants ¶
View Source
const ( MaxScheduleInterval = time.Minute MinScheduleInterval = time.Millisecond * 10 MinSlowScheduleInterval = time.Second * 3 ScheduleIntervalFactor = 1.3 )
options for interval of schedulers
Variables ¶
This section is empty.
Functions ¶
func CheckAddPeer ¶
CheckAddPeer check add peer
func CheckTransferLeader ¶
func CheckTransferLeader(c *check.C, op *schedule.Operator, kind schedule.OperatorKind, sourceID, targetID uint64)
CheckTransferLeader check whether leader is transferred
func CheckTransferPeer ¶
func CheckTransferPeer(c *check.C, op *schedule.Operator, kind schedule.OperatorKind, sourceID, targetID uint64)
CheckTransferPeer checks peer transfer
Types ¶
type MockSchedulerOptions ¶
type MockSchedulerOptions struct { RegionScheduleLimit uint64 LeaderScheduleLimit uint64 ReplicaScheduleLimit uint64 MaxSnapshotCount uint64 MaxPendingPeerCount uint64 MaxStoreDownTime time.Duration MaxReplicas int LocationLabels []string HotRegionLowThreshold int TolerantSizeRatio float64 LabelProperties map[string][]*metapb.StoreLabel }
MockSchedulerOptions is a mock of SchedulerOptions which implements Options interface
func (*MockSchedulerOptions) GetHotRegionLowThreshold ¶
func (mso *MockSchedulerOptions) GetHotRegionLowThreshold() int
GetHotRegionLowThreshold mock method
func (*MockSchedulerOptions) GetLeaderScheduleLimit ¶
func (mso *MockSchedulerOptions) GetLeaderScheduleLimit(name string) uint64
GetLeaderScheduleLimit mock method
func (*MockSchedulerOptions) GetLocationLabels ¶
func (mso *MockSchedulerOptions) GetLocationLabels() []string
GetLocationLabels mock method
func (*MockSchedulerOptions) GetMaxPendingPeerCount ¶
func (mso *MockSchedulerOptions) GetMaxPendingPeerCount() uint64
GetMaxPendingPeerCount mock method
func (*MockSchedulerOptions) GetMaxReplicas ¶
func (mso *MockSchedulerOptions) GetMaxReplicas(name string) int
GetMaxReplicas mock method
func (*MockSchedulerOptions) GetMaxSnapshotCount ¶
func (mso *MockSchedulerOptions) GetMaxSnapshotCount() uint64
GetMaxSnapshotCount mock method
func (*MockSchedulerOptions) GetMaxStoreDownTime ¶
func (mso *MockSchedulerOptions) GetMaxStoreDownTime() time.Duration
GetMaxStoreDownTime mock method
func (*MockSchedulerOptions) GetRegionScheduleLimit ¶
func (mso *MockSchedulerOptions) GetRegionScheduleLimit(name string) uint64
GetRegionScheduleLimit mock method
func (*MockSchedulerOptions) GetReplicaScheduleLimit ¶
func (mso *MockSchedulerOptions) GetReplicaScheduleLimit(name string) uint64
GetReplicaScheduleLimit mock method
func (*MockSchedulerOptions) GetTolerantSizeRatio ¶
func (mso *MockSchedulerOptions) GetTolerantSizeRatio() float64
GetTolerantSizeRatio mock method
func (*MockSchedulerOptions) SetMaxReplicas ¶
func (mso *MockSchedulerOptions) SetMaxReplicas(replicas int)
SetMaxReplicas mock method
Click to show internal directories.
Click to hide internal directories.