file

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidParam = errors.New("tae: invalid param")
	ErrInvalidName  = errors.New("tae: invalid name")
)

Functions

This section is empty.

Types

type Base

type Base interface {
	common.IRef
	io.Closer
	Fingerprint() *common.ID
}

type Block

type Block interface {
	Base
	Sync() error
	// IsAppendable() bool
	WriteTS(ts uint64) error
	ReadTS() (uint64, error)
	WriteRows(rows uint32) error
	ReadRows() uint32

	// OpenDeletesFile() common.IRWFile
	WriteDeletes(buf []byte) error
	ReadDeletes(buf []byte) error
	GetDeletesFileStat() common.FileInfo
	LoadDeletes() (*roaring.Bitmap, error)

	LoadUpdates() (map[uint16]*roaring.Bitmap, map[uint16]map[uint32]any)

	LoadIndexMeta() (any, error)
	WriteIndexMeta(buf []byte) (err error)

	OpenColumn(colIdx int) (ColumnBlock, error)

	// TODO: Remove later
	WriteSnapshot(bat *containers.Batch, ts uint64, masks map[uint16]*roaring.Bitmap,
		vals map[uint16]map[uint32]any, deletes *roaring.Bitmap) error
	WriteBatch(bat *containers.Batch, ts uint64) error
	LoadBatch([]types.Type, []string, []bool, *containers.Options) (bat *containers.Batch, err error)
	WriteColumnVec(ts uint64, colIdx int, vec containers.Vector) error

	Destroy() error
}

type ColumnBlock

type ColumnBlock interface {
	io.Closer
	WriteTS(ts uint64) error
	WriteData(buf []byte) error
	WriteIndex(idx int, buf []byte) error
	WriteUpdates(buf []byte) error

	ReadTS() uint64
	ReadData(buf []byte) error
	ReadIndex(idx int, buf []byte) error
	ReadUpdates(buf []byte) error

	GetDataFileStat() common.FileInfo

	OpenUpdateFile() (common.IRWFile, error)
	OpenIndexFile(idx int) (common.IRWFile, error)
	OpenDataFile() (common.IRWFile, error)
}

type Segment

type Segment interface {
	Base
	Name() string
	OpenBlock(id uint64, colCnt int, indexCnt map[int]int) (Block, error)
	WriteTS(ts uint64) error
	ReadTS() uint64
	String() string
	RemoveBlock(id uint64)
}

type SegmentFactory

type SegmentFactory interface {
	Build(dir string, id uint64) Segment
	EncodeName(id uint64) string
	DecodeName(name string) (id uint64, err error)
}

Jump to

Keyboard shortcuts

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