meta

package
v0.0.0-...-f73e696 Latest Latest
Warning

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

Go to latest
Published: May 11, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterInfo

type ClusterInfo struct {
	Cluster               string
	PrimaryMeta           string
	BalanceOperationCount int
}

type Meta

type Meta interface {
	// Lists all tables' health information.
	ListTableHealthInfos() ([]*client.TableHealthInfo, error)

	SetMetaLevelSteady() error

	SetAddSecondaryMaxCountForOneNode(num int) error
	ResetDefaultAddSecondaryMaxCountForOneNode() error

	SetNodeLivePercentageZero() error

	AssignSecondaryBlackList(blacklist string) error

	SetAssignDelayMs(delayMs int) error
	ResetDefaultAssignDelayMs() error

	// MigratePrimariesOut ensures that the node has no primary after the call finishes.
	MigratePrimariesOut(n *util.PegasusNode) error

	DowngradeNodeWithDetails(n *util.PegasusNode) (downgradedParts []*base.Gpid, err error)

	Rebalance(bool) error

	GetClusterInfo() (*ClusterInfo, error)

	ListNodes() ([]*admin.NodeInfo, error)

	GetClusterReplicaInfo() (*client.ClusterReplicaInfo, error)
}

Meta is a suite of API that connects to the Pegasus MetaServer, retrieves the cluster information or controls cluster state.

NOTE: This interface hides the many meta APIs in "admin-cli/client#Meta", and exposes only the API which are necessary for this tool. This design is to simplify mocking the MetaServer.

func NewMetaClient

func NewMetaClient(cluster string, metaList []string) (Meta, error)

NewMetaClient creates an instance of MetaClient. It fails if the target cluster doesn't exactly match the name `cluster`.

Jump to

Keyboard shortcuts

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