data

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAppendableSegmentNotFound = errors.New("tae data: no appendable segment")
	ErrAppendableBlockNotFound   = errors.New("tae data: no appendable block")
	ErrNotAppendable             = errors.New("tae data: not appendable")
	ErrUpdateUniqueKey           = errors.New("tae data: update unique key")
	ErrUpdateHiddenKey           = errors.New("tae data: update hidden key")
	ErrStaleRequest              = errors.New("tae data: stale request")

	ErrPossibleDuplicate = errors.New("tae data: possible duplicate")
	ErrDuplicate         = errors.New("tae data: duplicate")
	ErrNotFound          = errors.New("tae data: not found")
	ErrWrongType         = errors.New("tae data: wrong data type")
)

Functions

This section is empty.

Types

type Block

type Block interface {
	CheckpointUnit
	BlockReplayer

	GetRowsOnReplay() uint64
	GetID() *common.ID
	IsAppendable() bool
	Rows(txn txnif.AsyncTxn, coarse bool) int
	GetColumnDataByName(txn txnif.AsyncTxn, attr string, buffer *bytes.Buffer) (*model.ColumnView, error)
	GetColumnDataById(txn txnif.AsyncTxn, colIdx int, buffer *bytes.Buffer) (*model.ColumnView, error)
	GetMeta() any
	GetBufMgr() base.INodeManager

	MakeAppender() (BlockAppender, error)
	RangeDelete(txn txnif.AsyncTxn, start, end uint32, dt handle.DeleteType) (txnif.DeleteNode, error)
	Update(txn txnif.AsyncTxn, row uint32, colIdx uint16, v any) (txnif.UpdateNode, error)

	GetTotalChanges() int
	CollectChangesInRange(startTs, endTs uint64) (*model.BlockView, error)
	CollectAppendLogIndexes(startTs, endTs uint64) ([]*wal.Index, error)

	BatchDedup(txn txnif.AsyncTxn, pks containers.Vector, rowmask *roaring.Bitmap) error
	GetByFilter(txn txnif.AsyncTxn, filter *handle.Filter) (uint32, error)
	GetValue(txn txnif.AsyncTxn, row, col int) (any, error)
	PPString(level common.PPLevel, depth int, prefix string) string
	GetBlockFile() file.Block

	SetMaxCheckpointTS(ts uint64)
	GetMaxCheckpointTS() uint64
	GetMaxVisibleTS() uint64

	CheckpointWALClosure(endTs uint64) tasks.FuncT
	SyncBlockDataClosure(ts uint64, rows uint32) tasks.FuncT
	FlushColumnDataClosure(ts uint64, colIdx int, colData containers.Vector, sync bool) tasks.FuncT
	ForceCompact() error
	Destroy() error
	ReplayIndex() error
	Flush()
	Close()
}

type BlockAppender

type BlockAppender interface {
	GetID() *common.ID
	GetMeta() any
	PrepareAppend(rows uint32) (n uint32, err error)
	ApplyAppend(bat *containers.Batch,
		txn txnif.AsyncTxn,
		anode txnif.AppendNode,
	) (txnif.AppendNode, int, error)
	IsAppendable() bool
	ReplayAppend(bat *containers.Batch) error
}

type BlockReplayer

type BlockReplayer interface {
	OnReplayDelete(node txnif.DeleteNode) (err error)
	OnReplayUpdate(colIdx uint16, node txnif.UpdateNode) (err error)
	OnReplayAppend(node txnif.AppendNode) (err error)
	OnReplayAppendPayload(bat *containers.Batch) (err error)
}

type CheckpointUnit

type CheckpointUnit interface {
	MutationInfo() string
	RunCalibration()
	EstimateScore() int
	BuildCompactionTaskFactory() (tasks.TxnTaskFactory, tasks.TaskType, []common.ID, error)
}

type Segment

type Segment interface {
	CheckpointUnit
	GetID() uint64
	GetSegmentFile() file.Segment
	BatchDedup(txn txnif.AsyncTxn, pks containers.Vector) error
	Destory() error
}

type Table

type Table interface {
	GetHandle() TableHandle
	ApplyHandle(TableHandle)
}

type TableHandle

type TableHandle interface {
	GetAppender() (BlockAppender, error)
	SetAppender(*common.ID) BlockAppender
}

Jump to

Keyboard shortcuts

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