executor

package
v1.0.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddDuplication

func AddDuplication(c *Client, tableName string, remoteCluster string, freezed bool) error

AddDuplication command

func ClearAppEnv

func ClearAppEnv(c *Client, useTable string) error

ClearAppEnv command

func ClusterInfo

func ClusterInfo(client *Client) error

ClusterInfo command

func ConfigCommand added in v1.0.1

func ConfigCommand(client *Client, nodeType session.NodeType, nodeAddr string, name string, actionType string, value int64) error

TODO(jiashuo1) not support update collector config

func CreateTable

func CreateTable(c *Client, tableName string, partitionCount int, replicaCount int) error

CreateTable command

func DelAppEnv

func DelAppEnv(c *Client, useTable string, key string, deletePrefix bool) error

DelAppEnv command TODO(wutao): deleting a non-existed key returns "OK" now.

func DiskBalance

func DiskBalance() error

TODO(jiashuo1) need generate migrate strategy(step) depends the disk-info result to run

func DiskMigrate

func DiskMigrate(client *Client, replicaServer string, pidStr string, from string, to string) error

func DropTable

func DropTable(c *Client, tableName string, reservePeriod int64) error

DropTable command

func GetMetaLevel

func GetMetaLevel(c *Client) error

GetMetaLevel command

func ListAppEnvs

func ListAppEnvs(c *Client, useTable string) error

ListAppEnvs command

func ListNodes

func ListNodes(client *Client) error

ListNodes is nodes command.

func ListTables

func ListTables(client *Client, showDropped bool) error

ListTables command.

func ModifyDuplication

func ModifyDuplication(c *Client, tableName string, dupid int, status admin.DuplicationStatus) error

ModifyDuplication command

func QueryDiskInfo

func QueryDiskInfo(client *Client, infoType DiskInfoType, replicaServer string, tableName string, diskTag string) error

QueryDiskInfo command TODO(jiashuo1) need refactor

func QueryDuplication

func QueryDuplication(c *Client, tableName string) error

QueryDuplication command

func RecallTable

func RecallTable(client *Client, originTableID int, newTableName string) error

func RemoteCommand

func RemoteCommand(c *Client, nodeType session.NodeType, nodeAddr string, cmd string, args []string) error

RemoteCommand command.

func ServerInfo

func ServerInfo(c *Client) error

ServerInfo command

func SetAppEnv

func SetAppEnv(c *Client, useTable string, key, value string) error

SetAppEnv command

func SetMetaLevel

func SetMetaLevel(c *Client, lvlStr string) error

SetMetaLevel command

func ShowNodesStat

func ShowNodesStat(client *Client) error

func ShowPartitionsStats

func ShowPartitionsStats(client *Client, tableName string) error

ShowPartitionsStats is partition-stat command

func ShowTablePartitions

func ShowTablePartitions(client *Client, tableName string) error

ShowTablePartitions is table-partitions command

func TableStat

func TableStat(c *Client) error

TableStat is table-stat command.

func UseTable

func UseTable(client *Client, table string) error

Types

type Client

type Client struct {
	// Every command should use Client as the fmt.Fprint's writer.
	io.Writer

	// to access administration APIs
	Meta client.Meta

	// to obtain perf-counters of ReplicaServers
	Perf *aggregate.PerfClient

	Nodes *util.PegasusNodeManager
}

Client represents as a manager of various SDKs that can access both Pegasus ReplicaServer and MetaServer.

func NewClient

func NewClient(writer io.Writer, metaAddrs []string) *Client

NewClient creates a client for accessing Pegasus cluster for use of admin-cli.

type DiskInfoType

type DiskInfoType int32
const (
	CapacitySize DiskInfoType = 0
	ReplicaCount DiskInfoType = 1
)

Jump to

Keyboard shortcuts

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