data

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2023 License: Apache-2.0 Imports: 14 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAppendableBlockNotFound   = moerr.NewAppendableBlockNotFoundNoCtx()
	ErrAppendableSegmentNotFound = moerr.NewAppendableSegmentNotFoundNoCtx()
)

Functions

This section is empty.

Types

type Block

type Block interface {
	CheckpointUnit
	BlockReplayer

	DeletesInfo() string

	GetRowsOnReplay() uint64
	GetID() *common.ID
	IsAppendable() bool
	PrepareCompact() bool

	Rows() int
	GetColumnDataByNames(txn txnif.AsyncTxn, attrs []string, buffers []*bytes.Buffer) (*model.BlockView, error)
	GetColumnDataByIds(txn txnif.AsyncTxn, colIdxes []int, buffers []*bytes.Buffer) (*model.BlockView, error)
	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)

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

	// check wether any delete intents with prepared ts within [from, to]
	HasDeleteIntentsPreparedIn(from, to types.TS) bool

	BatchDedup(txn txnif.AsyncTxn, pks containers.Vector, rowmask *roaring.Bitmap, precommit bool) 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

	Init() error
	TryUpgrade() error
	CollectAppendInRange(start, end types.TS, withAborted bool) (*containers.Batch, error)
	CollectDeleteInRange(start, end types.TS, withAborted bool) (*containers.Batch, error)
	// GetAppendNodeByRow(row uint32) (an txnif.AppendNode)
	// GetDeleteNodeByRow(row uint32) (an txnif.DeleteNode)
	GetFs() *objectio.ObjectFS

	Close()
}

type BlockAppender

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

type BlockReplayer

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

type CheckpointUnit

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

type Segment

type Segment interface {
	CheckpointUnit
	GetID() uint64
	BatchDedup(txn txnif.AsyncTxn, pks containers.Vector) error
	Destroy() 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