store

package
v0.22.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DataCacheSize   = 256 << 20
	BitmapCacheSize = DataCacheSize * 2
)
View Source
const (
	DefaultTimeRange = 15 * time.Minute
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

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

func NewStore

func NewStore(db *badger.DB, seq *seq.Seq, tree *lsm.Tree) (*Storage, error)

func (*Storage) Close

func (s *Storage) Close() error

func (*Storage) CompileFilters

func (s *Storage) CompileFilters(txn *badger.Txn, scan *v1.Scan, r *bitmaps.Bitmap, o *visit.All)

func (*Storage) MaxTs

func (s *Storage) MaxTs() uint64

func (*Storage) MinTs

func (s *Storage) MinTs() uint64

func (*Storage) Save

func (s *Storage) Save(data *v1.Data) error

Save indexes and saves compressed data into badger key/value store. See transform package on which metadata is extracted from data for indexing.

data is assigned a SampleID and two indexes are built for this SampleID lookup.

Metadata Index

This tracks minTs,maxTs observed in data. For efficiency we use LSM tree containing arrow.Record of *v1.Meta. This index is kept in memory and persisted for durability but all computation are done in memory using arrow compute package.

Roaring Bitmap Index

A label to bitmap of samples mapping. This is kept in bitmap cache and persisted on tha key value store upon eviction.

func (*Storage) Scan

func (s *Storage) Scan(scan *v1.Scan) (result *v1.Data, err error)

func (*Storage) Start

func (s *Storage) Start(ctx context.Context)

Jump to

Keyboard shortcuts

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