mutable

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2023 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPrimaryKeys added in v1.1.0

func GetPrimaryKeys(schema []record.Field, primaryKeys []string) []record.PrimaryKey

func GetSidsImpl added in v1.1.0

func GetSidsImpl(size int) []uint64

func GetSizeLimit added in v1.1.0

func GetSizeLimit() int64

func InitConcurLimiter added in v1.1.0

func InitConcurLimiter(limit int)

func InitMutablePool added in v1.1.0

func InitMutablePool(size int)

func InitWriteRecPool added in v1.1.0

func InitWriteRecPool(size int)

func JoinWriteRec added in v1.1.0

func JoinWriteRec(table *MemTable, msName string)

func LoadMstRowCount added in v1.1.0

func LoadMstRowCount(countFile string) (int, error)

LoadMstRowCount is used to load the rowcount value for mst-level pre-aggregation.

func PutSidsImpl added in v1.1.0

func PutSidsImpl(sids []uint64)

func SetSizeLimit added in v1.1.0

func SetSizeLimit(limit int64)

func SetWriteChunk added in v1.1.0

func SetWriteChunk(msi *MsInfo, rec *record.Record)

func SortAndDedup added in v1.1.0

func SortAndDedup(table *MemTable, msName string)

func StoreMstRowCount added in v1.1.0

func StoreMstRowCount(countFile string, rowCount int) error

StoreMstRowCount is used to persist the rowcount value for mst-level pre-aggregation.

func WriteIntoFile added in v1.1.0

func WriteIntoFile(msb *immutable.MsBuilder, tmp bool, withPKIndex bool) error

func WriteRecordForFlush added in v1.1.0

func WriteRecordForFlush(rec *record.Record, msb *immutable.MsBuilder, tbStore immutable.TablesStore, id uint64, order bool, lastFlushTime int64, schema record.Schemas) *immutable.MsBuilder

Types

type MTable added in v1.1.0

type MTable interface {
	ApplyConcurrency(table *MemTable, f func(msName string))
	FlushChunks(table *MemTable, dataPath, msName string, lock *string, tbStore immutable.TablesStore)
	WriteRows(table *MemTable, rowsD *dictpool.Dict, wc WriteRowsCtx) error
	WriteCols(table *MemTable, rec *record.Record, mstsInfo map[string]*meta.MeasurementInfo, mst string) error
	Reset(table *MemTable)
	// contains filtered or unexported methods
}

type MemTable

type MemTable struct {
	MTable MTable //public method in MemTable
	// contains filtered or unexported fields
}

func GetMemTable

func GetMemTable(engineType config.EngineType) *MemTable

func NewMemTable

func NewMemTable(engineType config.EngineType) *MemTable

func (*MemTable) AddMemSize

func (t *MemTable) AddMemSize(size int64)

nolint

func (*MemTable) CreateMsInfo added in v1.1.0

func (t *MemTable) CreateMsInfo(name string, row *influx.Row, rec *record.Record) *MsInfo

func (*MemTable) GetMaxTimeBySidNoLock

func (t *MemTable) GetMaxTimeBySidNoLock(msName string, sid uint64) int64

func (*MemTable) GetMemSize

func (t *MemTable) GetMemSize() int64

func (*MemTable) GetMsInfo added in v1.1.0

func (t *MemTable) GetMsInfo(name string) (*MsInfo, error)

func (*MemTable) NeedFlush

func (t *MemTable) NeedFlush() bool

func (*MemTable) PutMemTable

func (t *MemTable) PutMemTable()

func (*MemTable) Ref

func (t *MemTable) Ref()

func (*MemTable) Reset

func (t *MemTable) Reset()

func (*MemTable) SetIdx

func (t *MemTable) SetIdx(idx *ski.ShardKeyIndex)

func (*MemTable) SetMsInfo added in v1.1.0

func (t *MemTable) SetMsInfo(name string, msInfo *MsInfo)

func (*MemTable) UnRef

func (t *MemTable) UnRef()

type MemTables added in v1.0.0

type MemTables struct {
	// contains filtered or unexported fields
}

func (*MemTables) Init added in v1.0.0

func (m *MemTables) Init(activeTbl, snapshotTbl *MemTable, readEnable bool)

func (*MemTables) Ref added in v1.0.0

func (m *MemTables) Ref()

func (*MemTables) UnRef added in v1.0.0

func (m *MemTables) UnRef()

func (*MemTables) Values added in v1.0.0

func (m *MemTables) Values(msName string, id uint64, tr util.TimeRange, schema record.Schemas, ascending bool) *record.Record

type MsInfo

type MsInfo struct {
	Name   string // measurement name with version
	Schema record.Schemas
	// contains filtered or unexported fields
}

func (*MsInfo) CreateChunk added in v1.0.0

func (msi *MsInfo) CreateChunk(sid uint64) (*WriteChunk, bool)

func (*MsInfo) CreateWriteChunkForColumnStore added in v1.1.0

func (msi *MsInfo) CreateWriteChunkForColumnStore(sortKeys []string)

func (*MsInfo) GetAllSid added in v1.1.0

func (msi *MsInfo) GetAllSid() []uint64

func (*MsInfo) GetRowChunks added in v1.1.0

func (msi *MsInfo) GetRowChunks() *rowChunks

func (*MsInfo) GetWriteChunk added in v1.1.0

func (msi *MsInfo) GetWriteChunk() *WriteChunkForColumnStore

func (*MsInfo) Init added in v1.0.0

func (msi *MsInfo) Init(row *influx.Row)

func (*MsInfo) SetWriteChunk added in v1.1.0

func (msi *MsInfo) SetWriteChunk(writeChunk *WriteChunkForColumnStore)

type SidsPool added in v1.1.0

type SidsPool struct {
	// contains filtered or unexported fields
}

type WriteChunk

type WriteChunk struct {
	Mu              sync.Mutex
	Sid             uint64
	LastFlushTime   int64
	OrderWriteRec   WriteRec
	UnOrderWriteRec WriteRec
}

func (*WriteChunk) Init

func (chunk *WriteChunk) Init(sid uint64, schema []record.Field)

func (*WriteChunk) SortRecord added in v1.1.0

func (chunk *WriteChunk) SortRecord(hlp *record.SortHelper)

func (*WriteChunk) SortRecordNoLock added in v1.1.0

func (chunk *WriteChunk) SortRecordNoLock(hlp *record.SortHelper)

type WriteChunkForColumnStore added in v1.1.0

type WriteChunkForColumnStore struct {
	Mu       sync.Mutex
	WriteRec WriteRec
	// contains filtered or unexported fields
}

func (*WriteChunkForColumnStore) SortRecord added in v1.1.0

func (chunk *WriteChunkForColumnStore) SortRecord()

type WriteRec

type WriteRec struct {
	// contains filtered or unexported fields
}

func (*WriteRec) GetRecord

func (writeRec *WriteRec) GetRecord() *record.Record

func (*WriteRec) SetLastAppendTime added in v1.1.0

func (writeRec *WriteRec) SetLastAppendTime(v int64)

func (*WriteRec) SetWriteRec added in v1.1.0

func (writeRec *WriteRec) SetWriteRec(rec *record.Record)

func (*WriteRec) SortRecord added in v1.1.0

func (writeRec *WriteRec) SortRecord(hlp *record.SortHelper)

type WriteRowsCtx added in v1.1.0

type WriteRowsCtx struct {
	GetLastFlushTime  func(msName string, sid uint64) int64
	AddRowCountsBySid func(msName string, sid uint64, rowCounts int64)
	MstsInfo          map[string]*meta.MeasurementInfo
	MsRowCount        *sync.Map
}

Jump to

Keyboard shortcuts

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