cluster

package
v2.4.0-rc.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BadPartitionView

type BadPartitionView struct {
	PartitionIDs []uint64
	Path         string
}

type ClusterClient

type ClusterClient struct {
	*client.MasterGClient
}

func NewClusterClient

func NewClusterClient(c *client.MasterGClient) *ClusterClient

func (*ClusterClient) AddMetaNode

func (c *ClusterClient) AddMetaNode(ctx context.Context, addr string, id uint64) (*GeneralResp, error)

func (*ClusterClient) AddRaftNode

func (c *ClusterClient) AddRaftNode(ctx context.Context, addr string, id uint64) (*GeneralResp, error)

func (*ClusterClient) ClusterFreeze

func (c *ClusterClient) ClusterFreeze(ctx context.Context, status bool) (*GeneralResp, error)

func (*ClusterClient) ClusterView

func (c *ClusterClient) ClusterView(ctx context.Context) (*ClusterView, error)

func (*ClusterClient) DataNodeGet

func (c *ClusterClient) DataNodeGet(ctx context.Context, addr string) (*DataNode, error)

func (*ClusterClient) DataNodeList

func (c *ClusterClient) DataNodeList(ctx context.Context) ([]DataNode, error)

func (*ClusterClient) DataNodeListTest

func (c *ClusterClient) DataNodeListTest(ctx context.Context, num int64) ([]DataNode, error)

func (*ClusterClient) DecommissionDataNode

func (c *ClusterClient) DecommissionDataNode(ctx context.Context, offLineAddr string) (*GeneralResp, error)

function begin .....

func (*ClusterClient) DecommissionDisk

func (c *ClusterClient) DecommissionDisk(ctx context.Context, diskPath string, offLineAddr string) (*GeneralResp, error)

func (*ClusterClient) DecommissionMetaNode

func (c *ClusterClient) DecommissionMetaNode(ctx context.Context, offLineAddr string) (*GeneralResp, error)

func (*ClusterClient) DecommissionMetaPartition

func (c *ClusterClient) DecommissionMetaPartition(ctx context.Context, nodeAddr string, partitionID uint64) (*GeneralResp, error)

func (*ClusterClient) GetTopology

func (c *ClusterClient) GetTopology(ctx context.Context) (*GeneralResp, error)

func (*ClusterClient) LoadMetaPartition

func (c *ClusterClient) LoadMetaPartition(ctx context.Context, partitionID uint64) (*GeneralResp, error)

func (*ClusterClient) MasterList

func (c *ClusterClient) MasterList(ctx context.Context) ([]MasterInfo, error)

func (*ClusterClient) MetaNodeGet

func (c *ClusterClient) MetaNodeGet(ctx context.Context, addr string) (*metaNode, error)

func (*ClusterClient) MetaNodeList

func (c *ClusterClient) MetaNodeList(ctx context.Context) ([]metaNode, error)

func (*ClusterClient) RemoveRaftNode

func (c *ClusterClient) RemoveRaftNode(ctx context.Context, addr string, id uint64) (*GeneralResp, error)

type ClusterView

type ClusterView struct {
	Applied             uint64
	BadMetaPartitionIDs []BadPartitionView
	BadPartitionIDs     []BadPartitionView
	DataNodeCount       int32
	DataNodeStatInfo    *NodeStatInfo
	DataNodes           []NodeView
	DataPartitionCount  int32
	DisableAutoAlloc    bool
	LeaderAddr          string
	MasterCount         int32
	MaxDataPartitionID  uint64
	MaxMetaNodeID       uint64
	MaxMetaPartitionID  uint64
	MetaNodeCount       int32
	MetaNodeStatInfo    *NodeStatInfo
	MetaNodeThreshold   float32
	MetaNodes           []NodeView
	MetaPartitionCount  int32
	Name                string
	ServerCount         int32
	VolStatInfo         []VolStatInfo
	VolumeCount         int32
}

type DataNode

type DataNode struct {
	Addr                      string
	AvailableSpace            uint64
	BadDisks                  []string
	Carry                     float64
	DataPartitionCount        uint32
	DataPartitionReports      []PartitionReport
	ID                        uint64
	IsActive                  bool
	NodeSetID                 uint64
	PersistenceDataPartitions []uint64
	ReportTime                time.Time
	SelectedTimes             uint64
	Total                     uint64
	UsageRatio                float64
	Used                      uint64
	ZoneName                  string
}

type GeneralResp

type GeneralResp struct {
	Code    int32
	Message string
}

struct begin .....

type MasterInfo

type MasterInfo struct {
	Addr     string
	Index    string
	IsLeader bool
}

type MetaPartitionReport

type MetaPartitionReport struct {
	End         uint64
	IsLeader    bool
	MaxInodeID  uint64
	PartitionID uint64
	Start       uint64
	Status      int
	VolName     string
}

type NodeStatInfo

type NodeStatInfo struct {
	IncreasedGB int64
	TotalGB     uint64
	UsedGB      uint64
	UsedRatio   string
}

type NodeView

type NodeView struct {
	Addr       string
	ID         uint64
	IsWritable bool
	Status     bool
	ToDataNode *DataNode
	ToMetaNode *metaNode
}

type PartitionReport

type PartitionReport struct {
	DiskPath        string
	ExtentCount     int
	IsLeader        bool
	NeedCompare     bool
	PartitionID     uint64
	PartitionStatus int
	Total           uint64
	Used            uint64
	VolName         string
}

type RWMutex

type RWMutex struct {
}

type Vol

type Vol struct {
	Capacity           uint64
	FollowerRead       bool
	ID                 uint64
	Name               string
	NeedToLowerReplica bool
	OSSAccessKey       string
	OSSSecretKey       string
	Owner              string
	RWMutex            RWMutex
	Status             uint8
}

type VolStatInfo

type VolStatInfo struct {
	EnableToken bool
	Name        string
	ToVolume    *Vol
	TotalSize   uint64
	UsedRatio   string
	UsedSize    uint64
}

Jump to

Keyboard shortcuts

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