schedulers

package
v2.0.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2018 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxScheduleInterval     = time.Second * 5
	MinScheduleInterval     = time.Millisecond * 10
	MinSlowScheduleInterval = time.Second * 3

	ScheduleIntervalFactor = 1.3
)

options for interval of schedulers

Variables

This section is empty.

Functions

func CheckAddPeer

func CheckAddPeer(c *check.C, op *schedule.Operator, kind schedule.OperatorKind, storeID uint64)

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 BalanceType

type BalanceType int

BalanceType : the perspective of balance

type MockSchedulerOptions

type MockSchedulerOptions struct {
	RegionScheduleLimit   uint64
	LeaderScheduleLimit   uint64
	ReplicaScheduleLimit  uint64
	MergeScheduleLimit    uint64
	MaxSnapshotCount      uint64
	MaxPendingPeerCount   uint64
	MaxStoreDownTime      time.Duration
	MaxReplicas           int
	MaxMergeRegionSize    uint64
	LocationLabels        []string
	HotRegionLowThreshold int
	TolerantSizeRatio     float64
	EnableRaftLearner     bool
	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) GetMaxMergeRegionSize

func (mso *MockSchedulerOptions) GetMaxMergeRegionSize() uint64

GetMaxMergeRegionSize 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) GetMergeScheduleLimit

func (mso *MockSchedulerOptions) GetMergeScheduleLimit(name string) uint64

GetMergeScheduleLimit 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) IsRaftLearnerEnabled

func (mso *MockSchedulerOptions) IsRaftLearnerEnabled() bool

IsRaftLearnerEnabled mock method

func (*MockSchedulerOptions) SetMaxReplicas

func (mso *MockSchedulerOptions) SetMaxReplicas(replicas int)

SetMaxReplicas mock method

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL