meta

package
v0.0.0-...-71dd0ca Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2018 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

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 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) 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, 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 uint32, target []byte) (*proto.InodeInfo, error)

func (*MetaWrapper) Delete_ll

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

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 (mw *MetaWrapper) Link(parentID uint64, name string, ino uint64) (*proto.InodeInfo, error)

func (*MetaWrapper) Lookup_ll

func (mw *MetaWrapper) Lookup_ll(parentID uint64, name string) (inode uint64, mode uint32, err 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) 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 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 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