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) GetCurrentNsWithLearners() ([]string, error)
- 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) GetSyncerNormalInit() (bool, error)
- func (dc *DataCoordinator) GetSyncerWriteOnly() (bool, 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)
- func (dc *DataCoordinator) UpdateSyncerNormalInit(v bool) error
- func (dc *DataCoordinator) UpdateSyncerWriteOnly(v bool) error
- type PartitionList
Constants ¶
View Source
const (
// allow more running since the rsync has a limit on the network traffic
MaxRaftJoinRunning = 20
)
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 transferring 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 * 20 // 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) GetCurrentNsWithLearners ¶ added in v0.9.0
func (dc *DataCoordinator) GetCurrentNsWithLearners() ([]string, error)
GetCurrentNsWithLearners will return all currently namespaces which have running learners, we can use this to check if any remaining learners still running in the namespace (even the register is removed).
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) GetSyncerNormalInit ¶ added in v0.9.0
func (dc *DataCoordinator) GetSyncerNormalInit() (bool, error)
func (*DataCoordinator) GetSyncerWriteOnly ¶ added in v0.9.0
func (dc *DataCoordinator) GetSyncerWriteOnly() (bool, 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)
func (*DataCoordinator) UpdateSyncerNormalInit ¶ added in v0.9.0
func (dc *DataCoordinator) UpdateSyncerNormalInit(v bool) error
func (*DataCoordinator) UpdateSyncerWriteOnly ¶ added in v0.9.0
func (dc *DataCoordinator) UpdateSyncerWriteOnly(v 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.