config

package
v0.0.0-...-d3d32da Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Level

type Level struct {
	BlockSize        int64
	BlockCacheSize   int64
	BlockCacheShards int
	SSTSize          int64
	MaximumSSTFiles  int
	BloomFilterSize  uint32
}

Configuration for a particular level in the LSMT.

func (*Level) GetBlockCacheShards

func (level *Level) GetBlockCacheShards() int

func (*Level) GetBlockCacheSize

func (level *Level) GetBlockCacheSize() int64

func (*Level) GetBlockSize

func (level *Level) GetBlockSize() int64

func (*Level) GetBloomFilterSize

func (level *Level) GetBloomFilterSize() uint32

func (*Level) GetSSTSize

func (level *Level) GetSSTSize() int64

type LevelOptions

type LevelOptions interface {
	GetBlockSize() int64
	GetBlockCacheSize() int64
	GetBlockCacheShards() int
	GetSSTSize() int64
	GetBloomFilterSize() uint32
}

Common options for Levels and the Sink

type Options

type Options struct {
	Levels              []*Level
	Sink                *Sink
	Path                string
	MemtableMaximumSize int64
	KeyMaximumSize      int
	ValueMaximumSize    int
}

Options for an LSMT. All size options are specified in bytes.

func (*Options) GetLevel

func (options *Options) GetLevel(i int) (LevelOptions, error)

Returns the level options for a given integer level.

func (*Options) Validate

func (options *Options) Validate() []error

Validates that all of the fields contained with the Options are valid. Returns a list of errors. If there are no errors then the list will be empty.

type Sink

type Sink struct {
	BlockSize        int64
	BlockCacheSize   int64
	BlockCacheShards int
	SSTSize          int64
	BloomFilterSize  uint32
}

Configuration for the sink level. The sink is a special case level that represents the bottom most level. The configuration is missing MaximumSSTFiles since there is no maximum.

func (*Sink) GetBlockCacheShards

func (sink *Sink) GetBlockCacheShards() int

func (*Sink) GetBlockCacheSize

func (sink *Sink) GetBlockCacheSize() int64

func (*Sink) GetBlockSize

func (sink *Sink) GetBlockSize() int64

func (*Sink) GetBloomFilterSize

func (sink *Sink) GetBloomFilterSize() uint32

func (*Sink) GetSSTSize

func (sink *Sink) GetSSTSize() int64

Jump to

Keyboard shortcuts

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