tree

package
v0.21.2 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DummyMap

type DummyMap map[string]string // place holder for cache_map package that will be merged soon

type InitTreesRepository

type InitTreesRepository func(manager sstable.Manager) TreeRepo

InitTreeRepository creates the tree cache, and stores part Manager for operations of parts (currently implemented as sstables). should be called at process init. decisions on who calls it and how to get a treesRepository will be taken later

type TreePart

type TreePart struct {
	PartName sstable.ID   `json:"part_name"`
	MaxKey   graveler.Key `json:"max_path"`
}

type TreeRepo

type TreeRepo interface {
	// NewTreeWriter returns a writer that uses the part manager to create a new tree
	NewTreeWriter(splitFactor int,

		closeAsync sstable.BatchWriterCloser,

	) TreeWriter
	// NewScannerFromTreeID accepts a tree ID, and returns an iterator over the tree
	NewIteratorFromTreeID(treeID graveler.TreeID, start graveler.Key) (graveler.ValueIterator, error)
	// NewIteratorFromTreeParts accept a tree in memory, returns iterator over the tree
	NewIteratorFromTreeSlice(treeSlice TreeSlice, start graveler.Key) (graveler.ValueIterator, error)
}

type TreeSlice

type TreeSlice struct {
	TreeSlice []TreePart
}

type TreeWriter

type TreeWriter interface {
	WriteEntry(record graveler.ValueRecord) error
	// FlushIterToTree writes the content of an iterator to the tree.
	FlushIterToTree(iter graveler.ValueIterator) error
	// SaveTree stores the tree to tierFS. During tree writing, parts are closed asynchronously and copied by tierFS
	// while writing continues. SaveTree waits until closing and copying all parts
	SaveTree() (graveler.TreeID, error)
	SaveTreeWithReusedParts(reuseTree TreeSlice,

	) (graveler.TreeID, error)
}

type TreesRepo

type TreesRepo struct {
	TreesMap   DummyMap
	PartManger sstable.Manager
}

Jump to

Keyboard shortcuts

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