fdbstat

package
v0.0.0-...-fdaabfb Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAllNodes

func GetAllNodes(db fdb.Database) (hosts []string, err error)

func GetNodesFromStatus

func GetNodesFromStatus(status string) (hosts []string, err error)

func GetStatus

func GetStatus(db fdb.Database) (status string, err error)

Types

type DirListing

type DirListing map[string]DirNode

type DirNode

type DirNode struct {
	FlattenedPath   string // Also used as 'key' to index into DirListing below
	Path            []string
	Prefix          []byte // raw key in original form
	PrefixPrintable string
	Children        []string // Immediate children only, slice of Flattened Path
}

type DirSizeGuestimate

type DirSizeGuestimate struct {
	Size       int64
	LowerBound int64
	UpperBound int64
}

type HashableKeyRange

type HashableKeyRange struct {
	Begin string
	End   string
}

func NewHashableKeyRange

func NewHashableKeyRange(kr fdb.KeyRange) HashableKeyRange

type KeyRangeStats

type KeyRangeStats struct {
	Begin []byte
	End   []byte
	Size  int64
}

func NewKeyRangeStats

func NewKeyRangeStats(kr fdb.KeyRange, size int64) KeyRangeStats

type PendingResponse

type PendingResponse struct {
	Kr HashableKeyRange
	Fi fdb.FutureInt64
}

type Surveyor

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

func NewSurveyor

func NewSurveyor(db fdb.Database, opts ...SurveyorOption) (s *Surveyor, err error)

func (*Surveyor) CalculateDBSize

func (s *Surveyor) CalculateDBSize(pmap *finder.PartitionMap) (sizeByRange map[HashableKeyRange]KeyRangeStats, err error)

func (*Surveyor) CalculateDBSizeAsync

func (s *Surveyor) CalculateDBSizeAsync(pmap *finder.PartitionMap) (sizeByRange map[HashableKeyRange]int64, totalSize int64, err error)

func (*Surveyor) CalculateRowCount

func (s *Surveyor) CalculateRowCount(pmap *finder.PartitionMap, readerThreads int) (totalRows int64, err error)

func (*Surveyor) EstimateDirectorySize

func (s *Surveyor) EstimateDirectorySize(sizeByRange map[HashableKeyRange]KeyRangeStats, directories DirListing) (err error)

func (*Surveyor) GetAllDirectories

func (s *Surveyor) GetAllDirectories() (directories DirListing, err error)

type SurveyorOption

type SurveyorOption func(exp *Surveyor)

func Logger

func Logger(logger *zap.Logger) SurveyorOption

Jump to

Keyboard shortcuts

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