tables

package
v0.0.0-...-e532b39 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileTable

type FileTable interface {
	BeginFlushing(table MemTable, withCallback MemTableFlushCallback)
	NewScanner() FileTableScanner
}

type FileTableScanner

type FileTableScanner interface {
}

type LevelFileTable

type LevelFileTable struct {
	TableRootDir string

	Level0 []*SStableRef
	Level1 []*SStableRef
	Level2 []*SStableRef
}

Leveled SStables are stored in concurrent lists.

func NewSStableFileTable

func NewSStableFileTable(tableRootDir string, logDir string) *LevelFileTable

func (*LevelFileTable) BeginFlushing

func (t *LevelFileTable) BeginFlushing(table MemTable, withCallback MemTableFlushCallback)

Flushing Memtable to File Table creates a level 0 SSTable tablet

func (*LevelFileTable) CommitChangeToLockFile

func (t *LevelFileTable) CommitChangeToLockFile(v interface{}) error

func (*LevelFileTable) NewScanner

func (t *LevelFileTable) NewScanner() FileTableScanner

type MemTable

type MemTable interface {
	MemTableOps

	KeyCountEstimate() uint
	Iterator() SortedKVIterator
}

func NewMapMemTable

func NewMapMemTable(maxKeySize int, maxValueSize int) MemTable

type MemTableFlushCallback

type MemTableFlushCallback func(bool, error)

type MemTableOps

type MemTableOps interface {
	Put(key []byte, value []byte) error
	Get(key []byte) (value []byte, ok bool, err error)
	Remove(key []byte) (ok bool, err error)
	Exists(key []byte) (ok bool, err error)
}

type SSTableFlushEvent

type SSTableFlushEvent struct {
	Level     int
	Timestamp int64
}

type SStableRef

type SStableRef struct {
	sync.Mutex
	sstable.SSTable

	Timestamp int64
	Level     int
}

func NewSSTableRef

func NewSSTableRef(level int) *SStableRef

type SortedKVIterator

type SortedKVIterator interface {
	Next() bool
	Current() (key types.KeyType, value maps.Value)
}

type ThreadSafeMapMemTable

type ThreadSafeMapMemTable struct {
	maps.ThreadsafeMap
	MaxKeySize   int
	MaxValueSize int
}

func (*ThreadSafeMapMemTable) Exists

func (m *ThreadSafeMapMemTable) Exists(key []byte) (ok bool, err error)

func (*ThreadSafeMapMemTable) Get

func (m *ThreadSafeMapMemTable) Get(key []byte) (value []byte, ok bool, err error)

func (*ThreadSafeMapMemTable) Iterator

func (*ThreadSafeMapMemTable) KeyCountEstimate

func (m *ThreadSafeMapMemTable) KeyCountEstimate() uint

func (*ThreadSafeMapMemTable) Put

func (m *ThreadSafeMapMemTable) Put(key []byte, value []byte) error

func (*ThreadSafeMapMemTable) Remove

func (m *ThreadSafeMapMemTable) Remove(key []byte) (ok bool, err error)

Jump to

Keyboard shortcuts

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