meta

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2019 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OpenRetryInterval = 5 * time.Millisecond
	OpenRetryLimit    = 1000
)
View Source
const (
	SendRetryLimit    = 100
	SendRetryInterval = 100 * time.Millisecond
	SendTimeLimit     = 20 * time.Second
)
View Source
const (
	HostsSeparator                = ","
	RefreshMetaPartitionsInterval = time.Minute * 5
)
View Source
const (
	MaxMountRetryLimit = 5
	MountRetryInterval = time.Second * 5
)
View Source
const (
	BatchIgetRespBuf = 1000
)
View Source
const (
	MaxSendToMaster = 3
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MetaConn

type MetaConn struct {
	// contains filtered or unexported fields
}

func (*MetaConn) String

func (mc *MetaConn) String() string

type MetaPartition

type MetaPartition struct {
	PartitionID uint64
	Start       uint64
	End         uint64
	Members     []string
	LeaderAddr  string
	Status      int8
}

func (*MetaPartition) Copy

func (mp *MetaPartition) Copy() btree.Item

func (*MetaPartition) Less

func (this *MetaPartition) Less(than btree.Item) bool

func (*MetaPartition) String

func (mp *MetaPartition) String() string

type MetaWrapper

type MetaWrapper struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewMetaWrapper

func NewMetaWrapper(volname, owner, 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) Create_ll

func (mw *MetaWrapper) Create_ll(parentID uint64, name string, mode, uid, gid uint32, target []byte) (*proto.InodeInfo, error)

func (*MetaWrapper) Delete_ll

func (mw *MetaWrapper) Delete_ll(parentID uint64, name string, isDir bool) (*proto.InodeInfo, error)

* Note that the return value of InodeInfo might be nil without error, * and the caller should make sure InodeInfo is valid before using it.

func (*MetaWrapper) Evict

func (mw *MetaWrapper) Evict(inode uint64) error

func (*MetaWrapper) GetExtents

func (mw *MetaWrapper) GetExtents(inode uint64) (gen uint64, size uint64, extents []proto.ExtentKey, err error)

func (*MetaWrapper) InodeGet_ll

func (mw *MetaWrapper) InodeGet_ll(inode uint64) (*proto.InodeInfo, error)
func (mw *MetaWrapper) Link(parentID uint64, name string, ino uint64) (*proto.InodeInfo, error)

func (*MetaWrapper) LocalIP added in v1.4.0

func (mw *MetaWrapper) LocalIP() string

func (*MetaWrapper) Lookup_ll

func (mw *MetaWrapper) Lookup_ll(parentID uint64, name string) (inode uint64, mode uint32, err error)

func (*MetaWrapper) ReadDir_ll

func (mw *MetaWrapper) ReadDir_ll(parentID uint64) ([]proto.Dentry, error)

func (*MetaWrapper) Rename_ll

func (mw *MetaWrapper) Rename_ll(srcParentID uint64, srcName string, dstParentID uint64, dstName string) (err 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, size uint64) error

type VolStatInfo

type VolStatInfo struct {
	Name      string
	TotalSize uint64
	UsedSize  uint64
}

type VolumeView

type VolumeView struct {
	VolName        string
	MetaPartitions []*MetaPartition
}

Jump to

Keyboard shortcuts

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