Documentation
¶
Index ¶
- Constants
- Variables
- func ChangeIntervalForTest()
- func GetNamespacePartitionBasePath(rootPath string, namespace string, partition int) string
- func GetNamespacePartitionFileName(namespace string, partition int, suffix string) string
- type DataCoordinator
- func (dc *DataCoordinator) GetClusterName() string
- func (dc *DataCoordinator) GetCurrentPD() cluster.NodeInfo
- func (dc *DataCoordinator) GetMyID() string
- func (dc *DataCoordinator) GetMyRegID() uint64
- func (dc *DataCoordinator) GetSnapshotSyncInfo(fullNamespace string) ([]common.SnapshotSyncInfo, error)
- func (dc *DataCoordinator) IsRemovingMember(m common.MemberInfo) (bool, error)
- func (dc *DataCoordinator) RestartAsStandalone(fullNamespace string) error
- func (dc *DataCoordinator) SetRegister(l cluster.DataNodeRegister) error
- func (dc *DataCoordinator) Start() error
- func (dc *DataCoordinator) Stats(namespace string, part int) *cluster.CoordStats
- func (dc *DataCoordinator) Stop()
- func (dc *DataCoordinator) UpdateMeForNamespaceLeader(fullNS string) (bool, error)
- type PartitionList
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()
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)
Click to show internal directories.
Click to hide internal directories.