Documentation ¶
Index ¶
- Constants
- type ChunkServer
- type ChunkServerLocation
- type CopySetInfo
- type CopySetServerInfo
- type FileInfo
- type GetChunkServerInCluster
- type GetChunkServerListInCopySets
- type GetCopySetsInChunkServer
- type GetCopySetsInCluster
- type GetFileAllocatedSize
- type GetFileInfo
- type GetFileSize
- type GetLogicalPool
- type ListChunkServer
- type ListDir
- type ListLogicalPoolRpc
- type ListPhysicalPoolRpc
- type ListPoolZonesRpc
- type ListZoneServer
- type LogicalPool
- type MdsClient
- func (cli *MdsClient) GetChunkServerInCluster() ([]ChunkServer, error)
- func (cli *MdsClient) GetChunkServerListInCopySets(logicalPoolId uint32, copysetIds []uint32) ([]CopySetServerInfo, error)
- func (cli *MdsClient) GetCopySetsInChunkServer(ip string, port uint32) ([]CopySetInfo, error)
- func (cli *MdsClient) GetCopySetsInCluster() ([]CopySetInfo, error)
- func (cli *MdsClient) GetFileAllocatedSize(filename string) (uint64, map[uint32]uint64, error)
- func (cli *MdsClient) GetFileInfo(filename, owner, sig string, date uint64) (FileInfo, error)
- func (cli *MdsClient) GetFileSize(fileName string) (uint64, error)
- func (cli *MdsClient) GetLogicalPool(poolId uint32) (LogicalPool, error)
- func (cli *MdsClient) ListChunkServer(serverId uint32) ([]ChunkServer, error)
- func (cli *MdsClient) ListDir(filename, owner, sig string, date uint64) ([]FileInfo, error)
- func (cli *MdsClient) ListLogicalPool() ([]LogicalPool, error)
- func (cli *MdsClient) ListPhysicalPool() ([]PhysicalPool, error)
- func (cli *MdsClient) ListPoolZone(poolId uint32) ([]Zone, error)
- func (cli *MdsClient) ListZoneServer(zoneId uint32) ([]Server, error)
- type MdsClientOption
- type PhysicalPool
- type Server
- type ThrottleParams
- type Zone
Constants ¶
View Source
const ( // file type INODE_DIRECTORY = "INODE_DIRECTORY" INODE_PAGEFILE = "INODE_PAGEFILE" INODE_APPENDFILE = "INODE_APPENDFILE" INODE_APPENDECFILE = "INODE_APPENDECFILE" INODE_SNAPSHOT_PAGEFILE = "INODE_SNAPSHOT_PAGEFILE" // file status FILE_CREATED = "kFileCreated" FILE_DELETING = "kFileDeleting" FILE_CLONING = "kFileCloning" FILE_CLONEMETA_INSTALLED = "kFileCloneMetaInstalled" FILE_CLONED = "kFileCloned" FILE_BEIING_CLONED = "kFileBeingCloned" // throttle type IOPS_TOTAL = "IOPS_TOTAL" IOPS_READ = "IOPS_READ" IOPS_WRITE = "IOPS_WRITE" BPS_TOTAL = "BPS_TOTAL" BPS_READ = "BPS_READ" BPS_WRITE = "BPS_WRITE" // apis GET_FILE_ALLOC_SIZE_FUNC = "GetAllocatedSize" LIST_DIR_FUNC = "ListDir" GET_FILE_INFO = "GetFileInfo" GET_FILE_SIZE = "GetFileSize" )
View Source
const ( // invalid type INVALID = "INVALID" // logical pool type PAGEFILE_TYPE = "PAGEFILE" APPENDFILE_TYPE = "APPENDFILE" APPENDECFILE_TYPE = "APPENDECFILE" // logical pool allocate status ALLOW_STATUS = "ALLOW" DENY_STATUS = "DENY" // chunkserver status READWRITE_STATUS = "READWRITE" PENDDING_STATUS = "PENDDING" RETIRED_STATUS = "RETIRED" // chunkserver disk status DISKNORMAL_STATUS = "DISKNORMAL" DISKERROR_STATUS = "DISKERROR" // chunkserver online status ONLINE_STATUS = "ONLINE" OFFLINE_STATUS = "OFFLINE" UNSTABLE_STATUS = "UNSTABLE" // apis LIST_PHYSICAL_POOL_FUNC = "ListPhysicalPool" LIST_LOGICAL_POOL_FUNC = "ListLogicalPool" LIST_POOL_ZONE_FUNC = "ListPoolZone" LIST_ZONE_SERVER_FUNC = "ListZoneServer" LIST_CHUNKSERVER_FUNC = "ListChunkServer" GET_CHUNKSERVER_IN_CLUSTER_FUNC = "GetChunkServerInCluster" GET_COPYSET_IN_CHUNKSERVER_FUNC = "GetCopySetsInChunkServer" GET_CHUNKSERVER_LIST_IN_COPYSETS = "GetChunkServerListInCopySets" GET_COPYSETS_IN_CLUSTER = "GetCopySetsInCluster" GET_LOGICAL_POOL = "GetLogicalPool" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChunkServer ¶
type ChunkServer struct { Id uint32 `json:"id" binding:"required"` DiskType string `json:"diskType" binding:"required"` HostIp string `json:"hostIp" binding:"required"` Port uint32 `json:"port" binding:"required"` Status string `json:"status" binding:"required"` DiskStatus string `json:"diskStatus" binding:"required"` OnlineStatus string `json:"onlineStatus" binding:"required"` MountPoint string `json:"mountPoint" binding:"required"` DiskCapacity string `json:"diskCapacity" binding:"required"` DiskUsed string `json:"diskUsed" binding:"required"` ExternalIp string `json:"externalIp"` }
type ChunkServerLocation ¶
type CopySetInfo ¶
type CopySetServerInfo ¶
type CopySetServerInfo struct { CopysetId uint32 `json:"copysetId" binding:"required"` CsLocs []ChunkServerLocation `json:"csLocs" binding:"required"` }
type FileInfo ¶
type FileInfo struct { Id uint64 `json:"id"` FileName string `json:"fileName"` ParentId uint64 `json:"parentId"` FileType string `json:"fileType"` Owner string `json:"owner"` ChunkSize uint32 `json:"chunkSize"` SegmentSize uint32 `json:"segmentSize"` Length uint64 `json:"length"` AllocateSize uint64 `json:"alloc"` Ctime string `json:"ctime"` SeqNum uint64 `json:"seqNum"` FileStatus string `json:"fileStatus"` OriginalFullPathName string `json:"originalFullPathName"` CloneSource string `json:"cloneSource"` CloneLength uint64 `json:"cloneLength"` StripeUnit uint64 `json:"stripeUnit"` StripeCount uint64 `json:"stripeCount"` ThrottleParams []ThrottleParams `json:"throttleParams"` Epoch uint64 `json:"epoch"` }
type GetChunkServerInCluster ¶
type GetChunkServerInCluster struct { Request *topology.GetChunkServerInClusterRequest // contains filtered or unexported fields }
get chunkserver in cluster
func (*GetChunkServerInCluster) NewRpcClient ¶
func (rpc *GetChunkServerInCluster) NewRpcClient(cc grpc.ClientConnInterface)
func (*GetChunkServerInCluster) Stub_Func ¶
func (rpc *GetChunkServerInCluster) Stub_Func(ctx context.Context, opt ...grpc.CallOption) (interface{}, error)
type GetChunkServerListInCopySets ¶
type GetChunkServerListInCopySets struct { Request *topology.GetChunkServerListInCopySetsRequest // contains filtered or unexported fields }
get chunkserver list in copysets
func (*GetChunkServerListInCopySets) NewRpcClient ¶
func (rpc *GetChunkServerListInCopySets) NewRpcClient(cc grpc.ClientConnInterface)
func (*GetChunkServerListInCopySets) Stub_Func ¶
func (rpc *GetChunkServerListInCopySets) Stub_Func(ctx context.Context, opt ...grpc.CallOption) (interface{}, error)
type GetCopySetsInChunkServer ¶
type GetCopySetsInChunkServer struct { Request *topology.GetCopySetsInChunkServerRequest // contains filtered or unexported fields }
get copysets on chunkserver
func (*GetCopySetsInChunkServer) NewRpcClient ¶
func (rpc *GetCopySetsInChunkServer) NewRpcClient(cc grpc.ClientConnInterface)
func (*GetCopySetsInChunkServer) Stub_Func ¶
func (rpc *GetCopySetsInChunkServer) Stub_Func(ctx context.Context, opt ...grpc.CallOption) (interface{}, error)
type GetCopySetsInCluster ¶
type GetCopySetsInCluster struct { Request *topology.GetCopySetsInClusterRequest // contains filtered or unexported fields }
get copysets in cluster
func (*GetCopySetsInCluster) NewRpcClient ¶
func (rpc *GetCopySetsInCluster) NewRpcClient(cc grpc.ClientConnInterface)
func (*GetCopySetsInCluster) Stub_Func ¶
func (rpc *GetCopySetsInCluster) Stub_Func(ctx context.Context, opt ...grpc.CallOption) (interface{}, error)
type GetFileAllocatedSize ¶
type GetFileAllocatedSize struct { Request *nameserver2.GetAllocatedSizeRequest // contains filtered or unexported fields }
get file(include dir) allocated space
func (*GetFileAllocatedSize) NewRpcClient ¶
func (rpc *GetFileAllocatedSize) NewRpcClient(cc grpc.ClientConnInterface)
func (*GetFileAllocatedSize) Stub_Func ¶
func (rpc *GetFileAllocatedSize) Stub_Func(ctx context.Context, opt ...grpc.CallOption) (interface{}, error)
type GetFileInfo ¶
type GetFileInfo struct { Request *nameserver2.GetFileInfoRequest // contains filtered or unexported fields }
get volume
func (*GetFileInfo) NewRpcClient ¶
func (rpc *GetFileInfo) NewRpcClient(cc grpc.ClientConnInterface)
func (*GetFileInfo) Stub_Func ¶
func (rpc *GetFileInfo) Stub_Func(ctx context.Context, opt ...grpc.CallOption) (interface{}, error)
type GetFileSize ¶
type GetFileSize struct { Request *nameserver2.GetFileSizeRequest // contains filtered or unexported fields }
nameserver2 get file/dir size
func (*GetFileSize) NewRpcClient ¶
func (rpc *GetFileSize) NewRpcClient(cc grpc.ClientConnInterface)
func (*GetFileSize) Stub_Func ¶
func (rpc *GetFileSize) Stub_Func(ctx context.Context, opt ...grpc.CallOption) (interface{}, error)
type GetLogicalPool ¶
type GetLogicalPool struct { Request *topology.GetLogicalPoolRequest // contains filtered or unexported fields }
get logical pool
func (*GetLogicalPool) NewRpcClient ¶
func (rpc *GetLogicalPool) NewRpcClient(cc grpc.ClientConnInterface)
func (*GetLogicalPool) Stub_Func ¶
func (rpc *GetLogicalPool) Stub_Func(ctx context.Context, opt ...grpc.CallOption) (interface{}, error)
type ListChunkServer ¶
type ListChunkServer struct { Request *topology.ListChunkServerRequest // contains filtered or unexported fields }
list chunkservers of server
func (*ListChunkServer) NewRpcClient ¶
func (rpc *ListChunkServer) NewRpcClient(cc grpc.ClientConnInterface)
func (*ListChunkServer) Stub_Func ¶
func (rpc *ListChunkServer) Stub_Func(ctx context.Context, opt ...grpc.CallOption) (interface{}, error)
type ListDir ¶
type ListDir struct { Request *nameserver2.ListDirRequest // contains filtered or unexported fields }
list volume in dir
func (*ListDir) NewRpcClient ¶
func (rpc *ListDir) NewRpcClient(cc grpc.ClientConnInterface)
type ListLogicalPoolRpc ¶
type ListLogicalPoolRpc struct { Request *topology.ListLogicalPoolRequest // contains filtered or unexported fields }
list logical pool
func (*ListLogicalPoolRpc) NewRpcClient ¶
func (rpc *ListLogicalPoolRpc) NewRpcClient(cc grpc.ClientConnInterface)
func (*ListLogicalPoolRpc) Stub_Func ¶
func (rpc *ListLogicalPoolRpc) Stub_Func(ctx context.Context, opt ...grpc.CallOption) (interface{}, error)
type ListPhysicalPoolRpc ¶
type ListPhysicalPoolRpc struct { Request *topology.ListPhysicalPoolRequest // contains filtered or unexported fields }
topology list physical pool
func (*ListPhysicalPoolRpc) NewRpcClient ¶
func (rpc *ListPhysicalPoolRpc) NewRpcClient(cc grpc.ClientConnInterface)
func (*ListPhysicalPoolRpc) Stub_Func ¶
func (rpc *ListPhysicalPoolRpc) Stub_Func(ctx context.Context, opt ...grpc.CallOption) (interface{}, error)
type ListPoolZonesRpc ¶
type ListPoolZonesRpc struct { Request *topology.ListPoolZoneRequest // contains filtered or unexported fields }
list zones of logical pool
func (*ListPoolZonesRpc) NewRpcClient ¶
func (rpc *ListPoolZonesRpc) NewRpcClient(cc grpc.ClientConnInterface)
func (*ListPoolZonesRpc) Stub_Func ¶
func (rpc *ListPoolZonesRpc) Stub_Func(ctx context.Context, opt ...grpc.CallOption) (interface{}, error)
type ListZoneServer ¶
type ListZoneServer struct { Request *topology.ListZoneServerRequest // contains filtered or unexported fields }
list servers of zone
func (*ListZoneServer) NewRpcClient ¶
func (rpc *ListZoneServer) NewRpcClient(cc grpc.ClientConnInterface)
func (*ListZoneServer) Stub_Func ¶
func (rpc *ListZoneServer) Stub_Func(ctx context.Context, opt ...grpc.CallOption) (interface{}, error)
type LogicalPool ¶
type LogicalPool struct { Id uint32 `json:"id" binding:"required"` Name string `json:"name" binding:"required"` PhysicalPoolId uint32 `json:"physicalPoolId" binding:"required"` Type string `json:"type" binding:"required"` CreateTime string `json:"createTime" binding:"required"` AllocateStatus string `json:"allocateStatus" binding:"required"` ScanEnable bool `json:"scanEnable"` }
type MdsClient ¶
type MdsClient struct {
// contains filtered or unexported fields
}
func NewMdsClient ¶
func NewMdsClient(option MdsClientOption) *MdsClient
func (*MdsClient) GetChunkServerInCluster ¶
func (cli *MdsClient) GetChunkServerInCluster() ([]ChunkServer, error)
func (*MdsClient) GetChunkServerListInCopySets ¶
func (cli *MdsClient) GetChunkServerListInCopySets(logicalPoolId uint32, copysetIds []uint32) ([]CopySetServerInfo, error)
func (*MdsClient) GetCopySetsInChunkServer ¶
func (cli *MdsClient) GetCopySetsInChunkServer(ip string, port uint32) ([]CopySetInfo, error)
func (*MdsClient) GetCopySetsInCluster ¶
func (cli *MdsClient) GetCopySetsInCluster() ([]CopySetInfo, error)
func (*MdsClient) GetFileAllocatedSize ¶
func (*MdsClient) GetFileInfo ¶
func (*MdsClient) GetLogicalPool ¶
func (cli *MdsClient) GetLogicalPool(poolId uint32) (LogicalPool, error)
func (*MdsClient) ListChunkServer ¶
func (cli *MdsClient) ListChunkServer(serverId uint32) ([]ChunkServer, error)
func (*MdsClient) ListLogicalPool ¶
func (cli *MdsClient) ListLogicalPool() ([]LogicalPool, error)
func (*MdsClient) ListPhysicalPool ¶
func (cli *MdsClient) ListPhysicalPool() ([]PhysicalPool, error)
func (*MdsClient) ListPoolZone ¶
list zones of physical pool
type MdsClientOption ¶
type PhysicalPool ¶
type Server ¶
type Server struct { Id uint32 `json:"id" binding:"required"` HostName string `json:"hostName" binding:"required"` InternalIp string `json:"internalIp" binding:"required"` InternalPort uint32 `json:"internalPort" binding:"required"` ExternalIp string `json:"externalIp" binding:"required"` ExternalPort uint32 `json:"externalPort" binding:"required"` ZoneId uint32 `json:"zoneId" binding:"required"` ZoneName string `json:"zoneName" binding:"required"` PhysicalPoolId uint32 `json:"physicalPoolId" binding:"required"` PhysicalPoolName string `json:"physicalName" binding:"required"` Desc string `json:"desc"` }
type ThrottleParams ¶
Click to show internal directories.
Click to hide internal directories.