Documentation ¶
Index ¶
- Constants
- Variables
- type ClusterInfo
- type MetaConn
- type MetaPartition
- type MetaWrapper
- func (mw *MetaWrapper) AppendExtentKey(inode uint64, ek proto.ExtentKey) error
- func (mw *MetaWrapper) BatchInodeGet(inodes []uint64) []*proto.InodeInfo
- func (mw *MetaWrapper) Cluster() string
- func (mw *MetaWrapper) Create_ll(parentID uint64, name string, mode uint32, target []byte) (*proto.InodeInfo, error)
- func (mw *MetaWrapper) Delete_ll(parentID uint64, name string) (*proto.InodeInfo, error)
- func (mw *MetaWrapper) Evict(inode uint64) error
- func (mw *MetaWrapper) GetExtents(inode uint64) ([]proto.ExtentKey, error)
- func (mw *MetaWrapper) InodeGet_ll(inode uint64) (*proto.InodeInfo, error)
- func (mw *MetaWrapper) Link(parentID uint64, name string, ino uint64) (*proto.InodeInfo, error)
- func (mw *MetaWrapper) Lookup_ll(parentID uint64, name string) (inode uint64, mode uint32, err error)
- func (mw *MetaWrapper) Open_ll(inode uint64) error
- func (mw *MetaWrapper) PullVolumeView() (*VolumeView, error)
- func (mw *MetaWrapper) ReadDir_ll(parentID uint64) ([]proto.Dentry, error)
- func (mw *MetaWrapper) Rename_ll(srcParentID uint64, srcName string, dstParentID uint64, dstName string) (err error)
- func (mw *MetaWrapper) Setattr(inode uint64, valid, mode, uid, gid uint32) error
- func (mw *MetaWrapper) Statfs() (total, used uint64)
- func (mw *MetaWrapper) Truncate(inode uint64) error
- func (mw *MetaWrapper) UpdateClusterInfo() error
- func (mw *MetaWrapper) UpdateMetaPartitions() error
- func (mw *MetaWrapper) UpdateVolStatInfo() error
- type VolStatInfo
- type VolumeView
Constants ¶
View Source
const ( SendRetryLimit = 100 SendRetryInterval = 100 * time.Millisecond SendTimeLimit = 20 * time.Second )
View Source
const ( HostsSeparator = "," MetaPartitionViewURL = "/client/vol" GetVolStatURL = "/client/volStat" GetClusterInfoURL = "/admin/getIp" RefreshMetaPartitionsInterval = time.Minute * 5 )
View Source
const (
BatchIgetRespBuf = 1000
)
View Source
const (
MaxSendToMaster = 3
)
Variables ¶
View Source
var (
NotLeader = errors.New("NotLeader")
)
Functions ¶
This section is empty.
Types ¶
type ClusterInfo ¶
type ClusterInfo struct {
Cluster string
}
type MetaPartition ¶
type MetaPartition struct { PartitionID uint64 Start uint64 End uint64 Members []string LeaderAddr string Status int8 }
func (*MetaPartition) String ¶
func (mp *MetaPartition) String() string
type MetaWrapper ¶
func NewMetaWrapper ¶
func NewMetaWrapper(volname, masterHosts string) (*MetaWrapper, error)
func (*MetaWrapper) AppendExtentKey ¶
func (mw *MetaWrapper) AppendExtentKey(inode uint64, ek proto.ExtentKey) error
Used as a callback by stream sdk
func (*MetaWrapper) BatchInodeGet ¶
func (mw *MetaWrapper) BatchInodeGet(inodes []uint64) []*proto.InodeInfo
func (*MetaWrapper) Cluster ¶
func (mw *MetaWrapper) Cluster() string
func (*MetaWrapper) Evict ¶
func (mw *MetaWrapper) Evict(inode uint64) error
func (*MetaWrapper) GetExtents ¶
func (mw *MetaWrapper) GetExtents(inode uint64) ([]proto.ExtentKey, error)
func (*MetaWrapper) InodeGet_ll ¶
func (mw *MetaWrapper) InodeGet_ll(inode uint64) (*proto.InodeInfo, error)
func (*MetaWrapper) Open_ll ¶
func (mw *MetaWrapper) Open_ll(inode uint64) error
func (*MetaWrapper) PullVolumeView ¶
func (mw *MetaWrapper) PullVolumeView() (*VolumeView, error)
VolName view managements
func (*MetaWrapper) ReadDir_ll ¶
func (mw *MetaWrapper) ReadDir_ll(parentID uint64) ([]proto.Dentry, error)
func (*MetaWrapper) Setattr ¶
func (mw *MetaWrapper) Setattr(inode uint64, valid, mode, uid, gid uint32) error
func (*MetaWrapper) Statfs ¶
func (mw *MetaWrapper) Statfs() (total, used uint64)
func (*MetaWrapper) Truncate ¶
func (mw *MetaWrapper) Truncate(inode uint64) error
func (*MetaWrapper) UpdateClusterInfo ¶
func (mw *MetaWrapper) UpdateClusterInfo() error
func (*MetaWrapper) UpdateMetaPartitions ¶
func (mw *MetaWrapper) UpdateMetaPartitions() error
func (*MetaWrapper) UpdateVolStatInfo ¶
func (mw *MetaWrapper) UpdateVolStatInfo() error
type VolStatInfo ¶
type VolumeView ¶
type VolumeView struct { VolName string MetaPartitions []*MetaPartition }
Click to show internal directories.
Click to hide internal directories.