datanode_coord

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: May 10, 2018 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxRaftJoinRunning = 2
)

Variables

View Source
var (
	MaxRetryWait         = time.Second * 3
	ErrNamespaceNotReady = cluster.NewCoordErr("namespace node is not ready", cluster.CoordLocalErr)
	ErrNamespaceInvalid  = errors.New("namespace name is invalid")
	ErrNamespaceNotFound = errors.New("namespace is not found")
	// the wait interval while check transfering leader between different partitions
	// to avoid too much partitions do the leader transfer in short time.
	TransferLeaderWait    = time.Second * 20
	CheckUnsyncedInterval = time.Minute * 5
	EnsureJoinCheckWait   = time.Second * 30
	// the wait interval allowed while changing leader in the same raft group
	// to avoid change the leader in the same raft too much
	ChangeLeaderInRaftWait = time.Minute

	CheckUnsyncedLearnerInterval = time.Second * 5
)

Functions

func ChangeIntervalForTest

func ChangeIntervalForTest()

func GetNamespacePartitionBasePath

func GetNamespacePartitionBasePath(rootPath string, namespace string, partition int) string

func GetNamespacePartitionFileName

func GetNamespacePartitionFileName(namespace string, partition int, suffix string) string

Types

type DataCoordinator

type DataCoordinator struct {
	// contains filtered or unexported fields
}

func NewDataCoordinator

func NewDataCoordinator(cluster string, nodeInfo *cluster.NodeInfo, nsMgr *node.NamespaceMgr) *DataCoordinator

func (*DataCoordinator) GetClusterName

func (dc *DataCoordinator) GetClusterName() string

func (*DataCoordinator) GetCurrentPD

func (dc *DataCoordinator) GetCurrentPD() cluster.NodeInfo

func (*DataCoordinator) GetMyID

func (dc *DataCoordinator) GetMyID() string

func (*DataCoordinator) GetMyRegID

func (dc *DataCoordinator) GetMyRegID() uint64

func (*DataCoordinator) GetSnapshotSyncInfo

func (dc *DataCoordinator) GetSnapshotSyncInfo(fullNamespace string) ([]common.SnapshotSyncInfo, error)

func (*DataCoordinator) IsRemovingMember

func (dc *DataCoordinator) IsRemovingMember(m common.MemberInfo) (bool, error)

func (*DataCoordinator) RestartAsStandalone

func (dc *DataCoordinator) RestartAsStandalone(fullNamespace string) error

func (*DataCoordinator) SetRegister

func (dc *DataCoordinator) SetRegister(l cluster.DataNodeRegister) error

func (*DataCoordinator) Start

func (dc *DataCoordinator) Start() error

func (*DataCoordinator) Stats

func (dc *DataCoordinator) Stats(namespace string, part int) *cluster.CoordStats

func (*DataCoordinator) Stop

func (dc *DataCoordinator) Stop()

func (*DataCoordinator) UpdateMeForNamespaceLeader

func (dc *DataCoordinator) UpdateMeForNamespaceLeader(fullNS string) (bool, error)

type PartitionList

type PartitionList []cluster.PartitionMetaInfo

func (PartitionList) Len

func (pl PartitionList) Len() int

func (PartitionList) Less

func (pl PartitionList) Less(i, j int) bool

func (PartitionList) Swap

func (pl PartitionList) Swap(i, j int)

Jump to

Keyboard shortcuts

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