Documentation ¶
Index ¶
- Constants
- Variables
- func AggregateData(newRec, baseRec *record.Record, ops []*comm.CallOption) bool
- func CacheDataInMemory() bool
- func CacheMetaInMemory() bool
- func CompactRecovery(path string, group *CompactGroup)
- func CreateTSSPFileReader(size int64, fd fileops.File, trailer *Trailer, tb *TableData, ver uint64, ...) (*tsspFileReader, error)
- func EstimateBufferSize(recSize int, rows int) int
- func FileOperation(f TSSPFile, op func())
- func FillNilCol(col *record.ColVal, size int, ref *record.Field)
- func FilterByField(rec *record.Record, filterRec *record.Record, filterOption *BaseFilterOptions, ...) *record.Record
- func FilterByFieldFuncs(rec, filterRec *record.Record, filterOption *BaseFilterOptions, ...) *record.Record
- func FilterByOpts(rec *record.Record, opt *FilterOptions) *record.Record
- func FilterByTime(rec *record.Record, tr util.TimeRange) *record.Record
- func FilterByTimeDescend(rec *record.Record, tr util.TimeRange) *record.Record
- func GenLogFileName(logSeq *uint64) string
- func GetDir(engineType config.EngineType, path string) string
- func GetMaxRowsPerSegment4TsStore() int
- func GetMergeFlag4TsStore() int32
- func GetSortKeyColVal(fi *FileIterator, sortKey []record.Field, ctx *ReadContext, segPosition int) ([]*record.ColVal, []record.SortItem, error)
- func GetTmpFileSuffix() string
- func Init()
- func InitDecFunctions()
- func InitQueryFileCache(cap uint32, enable bool)
- func InitWriterPool(size int)
- func IsInterfaceNil(value interface{}) bool
- func IsTempleFile(name string) bool
- func MergeRecovery(path string, name string, ctx *mergeContext)
- func MergeTimes(a []int64, b []int64, dst []int64) []int64
- func NewIndexWriter(indexName string, cacheMeta bool, limitCompact bool, lockPath *string) *indexWriter
- func NewLastMergeTime() *lastMergeTime
- func NewMemReaderEvictCtx() *memReaderEvictCtx
- func NewMergeContext(mst string) *mergeContext
- func NewMergePerformer(ur *UnorderedReader, stat *statistics.MergeStatItem) *mergePerformer
- func NewTSSPFileReader(name string, lockPath *string) (*tsspFileReader, error)
- func NonStreamingCompaction(fi FilesInfo) bool
- func PutIDTimePairs(pair *IdTimePairs)
- func ReleaseColumnBuilder(b PreAggBuilder)
- func ReleaseMsBuilder(msb *MsBuilder)
- func RemoveTsspSuffix(dataPath string) string
- func RenameTmpFiles(newFiles []TSSPFile) error
- func RenameTmpFilesWithPKIndex(newFiles []TSSPFile) error
- func ResetAggregateData(newRec *record.Record, ops []*comm.CallOption)
- func SetCacheDataBlock(en bool)
- func SetCacheMetaData(en bool)
- func SetCompactLimit(bytesPerSec int64, burstLimit int64)
- func SetFragmentsNumPerFlush(fragmentsNumPerFlush int)
- func SetImmTableMaxMemoryPercentage(sysTotalMem, percentage int)
- func SetMaxCompactor(n int)
- func SetMaxFullCompactor(n int)
- func SetMaxRowsPerSegment4TsStore(maxRowsPerSegmentLimit int)
- func SetMaxSegmentLimit4TsStore(limit int)
- func SetMergeFlag4TsStore(v int32)
- func SetSnapshotLimit(bytesPerSec int64, burstLimit int64)
- func SetSnapshotTblNum(snapshotTblNum int)
- func SnapshotLimit() bool
- func SumFilesSize(files []TSSPFile) int64
- func UnrefFiles(files ...TSSPFile)
- func WriteIntoFile(msb *MsBuilder, tmp bool, withPKIndex bool) error
- type BaseFilterOptions
- type BooleanPreAgg
- type BufferReader
- type ChunkDataBuilder
- type ChunkIterator
- type ChunkIterators
- func (c *ChunkIterators) Close()
- func (c *ChunkIterators) Len() int
- func (c *ChunkIterators) Less(i, j int) bool
- func (c *ChunkIterators) Next() (uint64, *record.Record, error)
- func (c *ChunkIterators) Pop() interface{}
- func (c *ChunkIterators) Push(v interface{})
- func (c *ChunkIterators) Swap(i, j int)
- func (c *ChunkIterators) WithLog(log *Log.Logger)
- type ChunkMeta
- func (m *ChunkMeta) AllocColMeta(ref *record.Field) *ColumnMeta
- func (m *ChunkMeta) Clone() *ChunkMeta
- func (m *ChunkMeta) DelEmptyColMeta()
- func (m *ChunkMeta) GetColMeta() []ColumnMeta
- func (m *ChunkMeta) GetSid() (sid uint64)
- func (m *ChunkMeta) Len() int
- func (m *ChunkMeta) Less(i, j int) bool
- func (m *ChunkMeta) MinMaxTime() (min int64, max int64)
- func (m *ChunkMeta) Rows(ab PreAggBuilder) int
- func (m *ChunkMeta) SegmentCount() int
- func (m *ChunkMeta) Size() int
- func (m *ChunkMeta) Swap(i, j int)
- func (m *ChunkMeta) TimeMeta() *ColumnMeta
- type ColumnBuilder
- type ColumnIterator
- func (itr *ColumnIterator) Close()
- func (itr *ColumnIterator) Error() error
- func (itr *ColumnIterator) IncrChunkUsed()
- func (itr *ColumnIterator) NextChunkMeta() bool
- func (itr *ColumnIterator) NextColumn(colIdx int) (*record.Field, bool)
- func (itr *ColumnIterator) PutCol(col *record.ColVal)
- func (itr *ColumnIterator) Run(p ColumnIteratorPerformer) error
- type ColumnIteratorPerformer
- type ColumnMeta
- type ColumnReader
- type CompactGroup
- type CompactedFileInfo
- type Config
- type FileIterator
- type FileIterators
- type FileReader
- type FilesInfo
- type FilterOptions
- type FirstLastReader
- type FloatPreAgg
- type FragmentIterators
- func (f *FragmentIterators) Close()
- func (f *FragmentIterators) CompareWithBreakPoint(curPos, breakPos int) bool
- func (f *FragmentIterators) Flush(tbStore *MmsTables, pkSchema record.Schemas, final bool) error
- func (f *FragmentIterators) GetBreakPoint()
- func (f *FragmentIterators) Len() int
- func (f *FragmentIterators) Less(i, j int) bool
- func (f *FragmentIterators) NextWithBreakPoint()
- func (f *FragmentIterators) Pop() interface{}
- func (f *FragmentIterators) Push(v interface{})
- func (f *FragmentIterators) Swap(i, j int)
- func (f *FragmentIterators) WithLog(log *Log.Logger)
- type FragmentIteratorsPool
- type IdTimePairs
- func (p *IdTimePairs) Add(id uint64, tm int64)
- func (p *IdTimePairs) AddRowCounts(rowCounts int64)
- func (p *IdTimePairs) Len() int
- func (p *IdTimePairs) Marshal(encTimes bool, dst []byte, ctx *encoding.CoderContext) []byte
- func (p *IdTimePairs) Reset(name string)
- func (p *IdTimePairs) Unmarshal(decTimes bool, src []byte) ([]byte, error)
- type ImmTable
- type InMerge
- type IntegerPreAgg
- type Location
- func (l *Location) AscendingDone()
- func (l *Location) Contains(sid uint64, tr util.TimeRange, buffer *[]byte) (bool, error)
- func (l *Location) DescendingDone()
- func (l *Location) GetChunkMeta() *ChunkMeta
- func (l *Location) ReadData(filterOpts *FilterOptions, dst *record.Record) (*record.Record, error)
- func (l *Location) ResetMeta()
- func (l *Location) SetFragmentRanges(frs []*fragment.FragmentRange)
- type LocationCursor
- func (l *LocationCursor) AddFilterRecPool(pool *record.CircularRecordPool)
- func (l *LocationCursor) AddLocation(loc *Location)
- func (l *LocationCursor) AddRef()
- func (l *LocationCursor) Close()
- func (l *LocationCursor) FragmentCount() int
- func (l *LocationCursor) Len() int
- func (l *LocationCursor) Less(i, j int) bool
- func (l *LocationCursor) ReadData(filterOpts *FilterOptions, dst *record.Record, ...) (*record.Record, error)
- func (l *LocationCursor) ReadMeta(filterOpts *FilterOptions, dst *record.Record, ...) (*record.Record, error)
- func (l *LocationCursor) ReadOutOfOrderMeta(filterOpts *FilterOptions, dst *record.Record) (*record.Record, error)
- func (l *LocationCursor) Reverse()
- func (l *LocationCursor) RowCount() int
- func (l *LocationCursor) Swap(i, j int)
- func (l *LocationCursor) Unref()
- type MeasurementInfo
- type MemBlock
- func (mb *MemBlock) AppendDataBlock(srcData []byte)
- func (mb *MemBlock) CopyBlocks(src MemoryReader)
- func (mb *MemBlock) DataBlocks() [][]byte
- func (mb *MemBlock) DataInMemory() bool
- func (mb *MemBlock) FreeMemory() int64
- func (mb *MemBlock) LoadIntoMemory(dr fileops.BasicFileReader, tr *Trailer, metaIndexItems []MetaIndex) error
- func (mb *MemBlock) MetaBlocks() [][]byte
- func (mb *MemBlock) MetaInMemory() bool
- func (mb *MemBlock) ReadChunkMetaBlock(metaIdx int, sid uint64, count uint32) []byte
- func (mb *MemBlock) ReadDataBlock(offset int64, size uint32, dstPtr *[]byte) ([]byte, error)
- func (mb *MemBlock) ReserveDataBlock(n int)
- func (mb *MemBlock) ReserveMetaBlock(n int)
- func (mb *MemBlock) Reset()
- func (mb *MemBlock) SetMetaBlocks(blocks [][]byte)
- func (mb *MemBlock) Size() int64
- type MemoryReader
- type MergeColPool
- type MetaIndex
- type MmsIdTime
- type MmsReaders
- type MmsTables
- func (m *MmsTables) AddPKFile(mstName string, file string, rec *record.Record, mark fragment.IndexFragment, ...)
- func (m *MmsTables) AddRowCountsBySid(measurement string, sid uint64, rowCounts int64)
- func (m *MmsTables) AddTSSPFiles(name string, isOrder bool, files ...TSSPFile)
- func (m *MmsTables) AddTable(mb *MsBuilder, isOrder bool, tmp bool)
- func (m *MmsTables) Close() error
- func (m *MmsTables) CompactDone(files []string)
- func (m *MmsTables) CompactionDisable()
- func (m *MmsTables) CompactionEnable()
- func (m *MmsTables) CompactionEnabled() bool
- func (m *MmsTables) DisableCompAndMerge()
- func (m *MmsTables) DropMeasurement(_ context.Context, name string) error
- func (m *MmsTables) EnableCompAndMerge()
- func (m *MmsTables) File(mstName string, fileName string, isOrder bool) TSSPFile
- func (m *MmsTables) FreeAllMemReader()
- func (m *MmsTables) FreeSequencer() bool
- func (m *MmsTables) FullCompact(shid uint64) error
- func (m *MmsTables) GetBothFilesRef(measurement string, hasTimeFilter bool, tr util.TimeRange) ([]TSSPFile, []TSSPFile)
- func (m *MmsTables) GetCSFiles(name string) (files *TSSPFiles, ok bool)
- func (m *MmsTables) GetFileSeq() uint64
- func (m *MmsTables) GetLastFlushTimeBySid(measurement string, sid uint64) int64
- func (m *MmsTables) GetMstFileStat() *statistics.FileStat
- func (m *MmsTables) GetOutOfOrderFileNum() int
- func (m *MmsTables) GetPKFile(mstName string, file string) (pkInfo *colstore.PKInfo, ok bool)
- func (m *MmsTables) GetRowCountsBySid(measurement string, sid uint64) (int64, error)
- func (m *MmsTables) GetTSSPFiles(name string, isOrder bool) (files *TSSPFiles, ok bool)
- func (m *MmsTables) IsOutOfOrderFilesExist() bool
- func (m *MmsTables) LevelCompact(level uint16, shid uint64) error
- func (m *MmsTables) Listen(signal chan struct{}, onClose func())
- func (m *MmsTables) MergeDisable()
- func (m *MmsTables) MergeEnable()
- func (m *MmsTables) MergeEnabled() bool
- func (m *MmsTables) MergeOutOfOrder(shId uint64, force bool) error
- func (m *MmsTables) NewChunkIterators(group FilesInfo) (*ChunkIterators, error)
- func (m *MmsTables) NewStreamIterators(group FilesInfo) (*StreamIterators, error)
- func (m *MmsTables) NewStreamWriteFile(mst string) *StreamWriteFile
- func (m *MmsTables) NextSequence() uint64
- func (m *MmsTables) Open() (int64, error)
- func (m *MmsTables) ReloadSequencer(seq *Sequencer, async bool)
- func (m *MmsTables) ReplaceDownSampleFiles(mstNames []string, originFiles [][]TSSPFile, newFiles [][]TSSPFile, ...) (err error)
- func (m *MmsTables) ReplaceFiles(name string, oldFiles, newFiles []TSSPFile, isOrder bool) (err error)
- func (m *MmsTables) ReplacePKFile(mstName string, file string, rec *record.Record, mark fragment.IndexFragment, ...) error
- func (m *MmsTables) Sequencer() *Sequencer
- func (m *MmsTables) SeriesTotal() uint64
- func (m *MmsTables) SetAddFunc(addFunc func(int64))
- func (m *MmsTables) SetImmTableType(engineType config.EngineType)
- func (m *MmsTables) SetMstInfo(name string, mstInfo *MeasurementInfo)
- func (m *MmsTables) SetOpId(shardId uint64, opId uint64)
- func (m *MmsTables) Tier() uint64
- func (m *MmsTables) Wait()
- type MsBuilder
- func (b *MsBuilder) FileVersion() uint64
- func (b *MsBuilder) Flush() error
- func (b *MsBuilder) GetPKInfoNum() int
- func (b *MsBuilder) GetPKMark(i int) fragment.IndexFragment
- func (b *MsBuilder) GetPKRecord(i int) *record.Record
- func (b *MsBuilder) MaxRowsPerSegment() int
- func (b *MsBuilder) Name() string
- func (b *MsBuilder) NewPKIndexWriter()
- func (b *MsBuilder) NewTSSPFile(tmp bool) (TSSPFile, error)
- func (b *MsBuilder) Reset()
- func (b *MsBuilder) SetTCLocation(tcLocation int8)
- func (b *MsBuilder) Size() int64
- func (b *MsBuilder) StoreTimes()
- func (b *MsBuilder) WithLog(log *logger.Logger)
- func (b *MsBuilder) WriteData(id uint64, data *record.Record) error
- func (b *MsBuilder) WriteRecord(id uint64, data *record.Record, schema record.Schemas, ...) (*MsBuilder, error)
- type Offset
- type PreAggBuilder
- type PreAggBuilders
- type QueryfileCache
- type ReadContext
- func (d *ReadContext) GetCoder() *encoding.CoderContext
- func (d *ReadContext) GetOps() []*comm.CallOption
- func (d *ReadContext) GetReadBuff() []byte
- func (d *ReadContext) InitPreAggBuilder()
- func (d *ReadContext) MatchPreAgg() bool
- func (d *ReadContext) Release()
- func (d *ReadContext) Reset()
- func (d *ReadContext) Set(ascending bool, tr util.TimeRange, onlyFirstOrLast bool, ...)
- func (d *ReadContext) SetOps(c []*comm.CallOption)
- func (d *ReadContext) SetSpan(readSpan, filterSpan *tracing.Span)
- func (d *ReadContext) SetTr(tr util.TimeRange)
- type Segment
- type SegmentRange
- type SegmentReader
- type Sequencer
- func (s *Sequencer) AddRowCounts(mn string, id uint64, rowCounts int64)
- func (s *Sequencer) BatchUpdateCheckTime(p *IdTimePairs, incrRows bool)
- func (s *Sequencer) DelMmsIdTime(name string)
- func (s *Sequencer) Get(mn string, id uint64) (lastFlushTime, rowCnt int64)
- func (s *Sequencer) IsLoading() bool
- func (s *Sequencer) ResetMmsIdTime()
- func (s *Sequencer) SeriesTotal() uint64
- func (s *Sequencer) SetStat(free, loading bool)
- func (s *Sequencer) SetToInLoading() bool
- func (s *Sequencer) UnRef()
- type SeriesCounter
- type SortKeyIterator
- type StreamIterator
- type StreamIterators
- func (c *StreamIterators) Close()
- func (c *StreamIterators) FileVersion() uint64
- func (c *StreamIterators) Flush() error
- func (c *StreamIterators) Init(id uint64, chunkDataOffset int64, schema record.Schemas)
- func (c *StreamIterators) Len() int
- func (c *StreamIterators) Less(i, j int) bool
- func (c *StreamIterators) NewFile(addFileExt bool) error
- func (c *StreamIterators) NewTSSPFile(tmp bool) (TSSPFile, error)
- func (c *StreamIterators) Pop() interface{}
- func (c *StreamIterators) Push(v interface{})
- func (c *StreamIterators) Size() int64
- func (c *StreamIterators) Swap(i, j int)
- func (c *StreamIterators) WithLog(log *Log.Logger)
- type StreamIteratorsPool
- type StreamWriteFile
- func (c *StreamWriteFile) AppendColumn(ref *record.Field) error
- func (c *StreamWriteFile) ChangeColumn(ref record.Field) error
- func (c *StreamWriteFile) ChangeSid(sid uint64)
- func (c *StreamWriteFile) Close(isError bool)
- func (c *StreamWriteFile) Flush() error
- func (c *StreamWriteFile) GetTSSPFile() TSSPFile
- func (c *StreamWriteFile) Init(id uint64, chunkDataOffset int64, schema record.Schemas)
- func (c *StreamWriteFile) InitFile(seq uint64) error
- func (c *StreamWriteFile) InitMergedFile(f TSSPFile) error
- func (c *StreamWriteFile) NewFile(addFileExt bool) error
- func (c *StreamWriteFile) NewTSSPFile(tmp bool) (TSSPFile, error)
- func (c *StreamWriteFile) SetValidate(en bool)
- func (c *StreamWriteFile) Size() int64
- func (c *StreamWriteFile) WriteCurrentMeta() error
- func (c *StreamWriteFile) WriteData(id uint64, ref record.Field, col record.ColVal, timeCol *record.ColVal) error
- func (c *StreamWriteFile) WriteFile() error
- func (c *StreamWriteFile) WriteMeta(cm *ChunkMeta) error
- type StringPreAgg
- type TSSPFile
- type TSSPFileName
- func (n *TSSPFileName) Equal(other *TSSPFileName) bool
- func (n *TSSPFileName) ParseFileName(name string) error
- func (n *TSSPFileName) Path(dir string, tmp bool) string
- func (n *TSSPFileName) SetExtend(extend uint16)
- func (n *TSSPFileName) SetLevel(l uint16)
- func (n *TSSPFileName) SetMerge(merge uint16)
- func (n *TSSPFileName) SetOrder(v bool)
- func (n *TSSPFileName) SetSeq(seq uint64)
- func (n *TSSPFileName) String() string
- func (n *TSSPFileName) TmpPath(dir string) string
- type TSSPFiles
- type TableData
- type TableReaders
- type TableStat
- type TableStoreGC
- type TablesGC
- type TablesStore
- type TimePreAgg
- type Trailer
- type UnorderedColumnReader
- type UnorderedReader
- func (r *UnorderedReader) AddFiles(files []TSSPFile)
- func (r *UnorderedReader) AllocNilCol(size int, ref *record.Field) *record.ColVal
- func (r *UnorderedReader) Close()
- func (r *UnorderedReader) HasSeries(sid uint64) bool
- func (r *UnorderedReader) InitTimes(sid uint64, maxTime int64) error
- func (r *UnorderedReader) Read(sid uint64, ref *record.Field, maxTime int64) (*record.ColVal, []int64, error)
- func (r *UnorderedReader) ReadAllTimes() []int64
- func (r *UnorderedReader) ReadRemain(sid uint64, cb remainCallback) error
- func (r *UnorderedReader) ReadSeriesSchemas(sid uint64, maxTime int64) record.Schemas
- func (r *UnorderedReader) ReadTimes(ref *record.Field, maxTime int64) []int64
- type UnorderedReaderContext
Constants ¶
const ( DefaultMaxRowsPerSegment4TsStore = 1000 DefaultMaxRowsPerSegment4ColStore = colstore.RowsNumPerFragment // should be the same as RowsNumPerFragment@colstore DefaultMaxSegmentLimit4ColStore = 256 * 1024 DefaultMaxChunkMetaItemSize = 256 * 1024 DefaultMaxChunkMetaItemCount = 512 DefaultSnapshotTblNum = 8 NonStreamingCompact = 2 StreamingCompact = 1 AutoCompact = 0 )
const ( PRELOAD = iota LOAD )
const ( MergeFirstAvgSize = 10 * 1024 * 1024 MergeFirstDstSize = 10 * 1024 * 1024 MergeFirstRatio = 0.5 )
const ( BLOOMFILTER_SIZE = 8 SERIESKEY_STATISTIC_SIZE = 24 COMPRESSION_RATIO = 2 )
const ( IndexOfTimeStoreFlag = 0 TimeStoreFlag = 1 )
const ( DownSampleLogDir = "downsample_log" TsspDirName = "tssp" ColumnStoreDirName = "columnstore" CountBinFile = "count.txt" )
const (
CompactLevels = 7
)
Variables ¶
var ( ErrCompStopped = errors.New("compact stopped") ErrDownSampleStopped = errors.New("downSample stopped") ErrDroppingMst = errors.New("measurement is dropped") LevelCompactRule = []uint16{0, 1, 0, 2, 0, 3, 0, 1, 2, 3, 0, 4, 0, 5, 0, 1, 2, 6} LevelCompactRuleForCs = []uint16{0, 1, 0, 1, 0, 1} // columnStore currently only doing level 0 and level 1 compaction,but the full functionality is available LeveLMinGroupFiles = [CompactLevels]int{8, 4, 4, 4, 4, 4, 2} EnableMergeOutOfOrder = true MaxNumOfFileToMerge = 256 MaxSizeOfFileToMerge int64 = 512 * 1024 * 1024 // 512MB )
var ( MinMaxTimeLen = int(unsafe.Sizeof(SegmentRange{})) SegmentLen = (Segment{}).bytes() ColumnMetaLenMin = (ColumnMeta{}).bytes(1) ChunkMetaLen = int(unsafe.Sizeof(ChunkMeta{})-24*2) + MinMaxTimeLen ChunkMetaMinLen = ChunkMetaLen + ColumnMetaLenMin*2 MetaIndexLen = int(unsafe.Sizeof(MetaIndex{})) )
var (
CLog = Log.NewLogger(errno.ModuleCompact)
)
var ErrDirtyLog = errors.New("incomplete log file")
Functions ¶
func AggregateData ¶
func AggregateData(newRec, baseRec *record.Record, ops []*comm.CallOption) bool
func CacheDataInMemory ¶
func CacheDataInMemory() bool
func CacheMetaInMemory ¶
func CacheMetaInMemory() bool
func CompactRecovery ¶
func CompactRecovery(path string, group *CompactGroup)
func CreateTSSPFileReader ¶
func EstimateBufferSize ¶
func FileOperation ¶ added in v1.0.0
func FileOperation(f TSSPFile, op func())
func FilterByField ¶
func FilterByFieldFuncs ¶ added in v1.1.0
func FilterByFieldFuncs(rec, filterRec *record.Record, filterOption *BaseFilterOptions, filterBitmap *bitmap.FilterBitmap) *record.Record
func FilterByOpts ¶ added in v1.0.1
func FilterByOpts(rec *record.Record, opt *FilterOptions) *record.Record
func FilterByTimeDescend ¶
func GenLogFileName ¶ added in v1.0.0
func GetMaxRowsPerSegment4TsStore ¶ added in v1.1.0
func GetMaxRowsPerSegment4TsStore() int
func GetMergeFlag4TsStore ¶ added in v1.1.0
func GetMergeFlag4TsStore() int32
func GetSortKeyColVal ¶ added in v1.1.1
func GetSortKeyColVal(fi *FileIterator, sortKey []record.Field, ctx *ReadContext, segPosition int) ([]*record.ColVal, []record.SortItem, error)
func GetTmpFileSuffix ¶ added in v1.1.0
func GetTmpFileSuffix() string
func InitDecFunctions ¶
func InitDecFunctions()
func InitQueryFileCache ¶ added in v1.1.0
func InitWriterPool ¶ added in v1.1.0
func InitWriterPool(size int)
func IsInterfaceNil ¶
func IsInterfaceNil(value interface{}) bool
func IsTempleFile ¶
func MergeRecovery ¶
func NewIndexWriter ¶
func NewLastMergeTime ¶ added in v1.0.0
func NewLastMergeTime() *lastMergeTime
func NewMemReaderEvictCtx ¶
func NewMemReaderEvictCtx() *memReaderEvictCtx
func NewMergeContext ¶ added in v1.0.0
func NewMergeContext(mst string) *mergeContext
func NewMergePerformer ¶ added in v1.0.0
func NewMergePerformer(ur *UnorderedReader, stat *statistics.MergeStatItem) *mergePerformer
func NewTSSPFileReader ¶
func NonStreamingCompaction ¶
func PutIDTimePairs ¶
func PutIDTimePairs(pair *IdTimePairs)
func ReleaseColumnBuilder ¶
func ReleaseColumnBuilder(b PreAggBuilder)
func ReleaseMsBuilder ¶ added in v1.0.0
func ReleaseMsBuilder(msb *MsBuilder)
func RemoveTsspSuffix ¶ added in v1.1.0
func RenameTmpFiles ¶
func RenameTmpFilesWithPKIndex ¶ added in v1.1.0
func ResetAggregateData ¶
func ResetAggregateData(newRec *record.Record, ops []*comm.CallOption)
func SetCacheDataBlock ¶
func SetCacheDataBlock(en bool)
func SetCacheMetaData ¶
func SetCacheMetaData(en bool)
func SetCompactLimit ¶
func SetFragmentsNumPerFlush ¶ added in v1.1.1
func SetFragmentsNumPerFlush(fragmentsNumPerFlush int)
func SetImmTableMaxMemoryPercentage ¶
func SetImmTableMaxMemoryPercentage(sysTotalMem, percentage int)
func SetMaxCompactor ¶
func SetMaxCompactor(n int)
func SetMaxFullCompactor ¶
func SetMaxFullCompactor(n int)
func SetMaxRowsPerSegment4TsStore ¶ added in v1.1.0
func SetMaxRowsPerSegment4TsStore(maxRowsPerSegmentLimit int)
func SetMaxSegmentLimit4TsStore ¶ added in v1.1.0
func SetMaxSegmentLimit4TsStore(limit int)
func SetMergeFlag4TsStore ¶ added in v1.1.0
func SetMergeFlag4TsStore(v int32)
func SetSnapshotLimit ¶
func SetSnapshotTblNum ¶ added in v1.1.0
func SetSnapshotTblNum(snapshotTblNum int)
func SnapshotLimit ¶
func SnapshotLimit() bool
func SumFilesSize ¶ added in v1.0.0
func UnrefFiles ¶
func UnrefFiles(files ...TSSPFile)
Types ¶
type BaseFilterOptions ¶ added in v1.1.0
type BaseFilterOptions struct { FiltersMap map[string]interface{} RedIdxMap map[int]struct{} // redundant columns, which are not required after filtering. FieldsIdx []int // field index in schema FilterTags []string // filter tag name CondFunctions *binaryfilterfunc.ConditionImpl }
type BooleanPreAgg ¶
type BooleanPreAgg struct {
// contains filtered or unexported fields
}
func NewBooleanPreAgg ¶
func NewBooleanPreAgg() *BooleanPreAgg
type BufferReader ¶ added in v1.0.0
type BufferReader struct {
// contains filtered or unexported fields
}
func NewBufferReader ¶ added in v1.0.0
func NewBufferReader(maxSize uint32) *BufferReader
func (*BufferReader) Read ¶ added in v1.0.0
func (br *BufferReader) Read(offset int64, size uint32) ([]byte, error)
func (*BufferReader) Reset ¶ added in v1.0.0
func (br *BufferReader) Reset(r TSSPFile)
type ChunkDataBuilder ¶
type ChunkDataBuilder struct {
// contains filtered or unexported fields
}
func NewChunkDataBuilder ¶
func NewChunkDataBuilder(maxRowsPerSegment, maxSegmentLimit int) *ChunkDataBuilder
func (*ChunkDataBuilder) EncodeChunk ¶
func (*ChunkDataBuilder) EncodeChunkForColumnStore ¶ added in v1.1.1
func (*ChunkDataBuilder) EncodeTime ¶
func (b *ChunkDataBuilder) EncodeTime(offset int64) error
type ChunkIterator ¶
type ChunkIterator struct { *FileIterator // contains filtered or unexported fields }
func NewChunkIterator ¶
func NewChunkIterator(r *FileIterator) *ChunkIterator
func (*ChunkIterator) Close ¶
func (c *ChunkIterator) Close()
func (*ChunkIterator) GetRecord ¶ added in v1.0.0
func (c *ChunkIterator) GetRecord() *record.Record
func (*ChunkIterator) GetSeriesID ¶ added in v1.0.0
func (c *ChunkIterator) GetSeriesID() uint64
func (*ChunkIterator) Next ¶
func (c *ChunkIterator) Next() bool
func (*ChunkIterator) WithLog ¶
func (c *ChunkIterator) WithLog(log *Log.Logger)
type ChunkIterators ¶
type ChunkIterators struct {
// contains filtered or unexported fields
}
func (*ChunkIterators) Close ¶
func (c *ChunkIterators) Close()
func (*ChunkIterators) Len ¶
func (c *ChunkIterators) Len() int
func (*ChunkIterators) Less ¶
func (c *ChunkIterators) Less(i, j int) bool
func (*ChunkIterators) Pop ¶
func (c *ChunkIterators) Pop() interface{}
func (*ChunkIterators) Push ¶
func (c *ChunkIterators) Push(v interface{})
func (*ChunkIterators) Swap ¶
func (c *ChunkIterators) Swap(i, j int)
func (*ChunkIterators) WithLog ¶
func (c *ChunkIterators) WithLog(log *Log.Logger)
type ChunkMeta ¶
type ChunkMeta struct {
// contains filtered or unexported fields
}
func (*ChunkMeta) AllocColMeta ¶ added in v1.1.0
func (m *ChunkMeta) AllocColMeta(ref *record.Field) *ColumnMeta
func (*ChunkMeta) DelEmptyColMeta ¶ added in v1.1.0
func (m *ChunkMeta) DelEmptyColMeta()
func (*ChunkMeta) GetColMeta ¶ added in v1.0.0
func (m *ChunkMeta) GetColMeta() []ColumnMeta
func (*ChunkMeta) MinMaxTime ¶
func (*ChunkMeta) Rows ¶
func (m *ChunkMeta) Rows(ab PreAggBuilder) int
func (*ChunkMeta) SegmentCount ¶ added in v1.0.0
func (*ChunkMeta) TimeMeta ¶
func (m *ChunkMeta) TimeMeta() *ColumnMeta
type ColumnBuilder ¶
type ColumnBuilder struct {
// contains filtered or unexported fields
}
func NewColumnBuilder ¶
func NewColumnBuilder() *ColumnBuilder
func (*ColumnBuilder) BuildPreAgg ¶ added in v1.0.0
func (b *ColumnBuilder) BuildPreAgg()
type ColumnIterator ¶ added in v1.0.0
type ColumnIterator struct {
// contains filtered or unexported fields
}
func NewColumnIterator ¶ added in v1.0.0
func NewColumnIterator(fi *FileIterator) *ColumnIterator
func (*ColumnIterator) Close ¶ added in v1.0.0
func (itr *ColumnIterator) Close()
func (*ColumnIterator) Error ¶ added in v1.0.0
func (itr *ColumnIterator) Error() error
func (*ColumnIterator) IncrChunkUsed ¶ added in v1.0.0
func (itr *ColumnIterator) IncrChunkUsed()
func (*ColumnIterator) NextChunkMeta ¶ added in v1.0.0
func (itr *ColumnIterator) NextChunkMeta() bool
func (*ColumnIterator) NextColumn ¶ added in v1.0.0
func (itr *ColumnIterator) NextColumn(colIdx int) (*record.Field, bool)
func (*ColumnIterator) PutCol ¶ added in v1.0.0
func (itr *ColumnIterator) PutCol(col *record.ColVal)
func (*ColumnIterator) Run ¶ added in v1.0.0
func (itr *ColumnIterator) Run(p ColumnIteratorPerformer) error
type ColumnIteratorPerformer ¶ added in v1.0.0
type ColumnMeta ¶
type ColumnMeta struct {
// contains filtered or unexported fields
}
func (*ColumnMeta) Clone ¶ added in v1.0.0
func (m *ColumnMeta) Clone() ColumnMeta
func (*ColumnMeta) IsTime ¶ added in v1.1.0
func (m *ColumnMeta) IsTime() bool
func (*ColumnMeta) Name ¶ added in v1.1.0
func (m *ColumnMeta) Name() string
func (*ColumnMeta) RowCount ¶
func (m *ColumnMeta) RowCount(ref *record.Field, decs *ReadContext) (int64, error)
type ColumnReader ¶
type CompactGroup ¶
type CompactGroup struct {
// contains filtered or unexported fields
}
func NewCompactGroup ¶
func NewCompactGroup(name string, toLevle uint16, count int) *CompactGroup
type CompactedFileInfo ¶
type Config ¶
type Config struct { SnapshotTblNum int FragmentsNumPerFlush int // contains filtered or unexported fields }
func GetColStoreConfig ¶ added in v1.1.0
func GetColStoreConfig() *Config
func GetTsStoreConfig ¶ added in v1.1.0
func GetTsStoreConfig() *Config
func NewColumnStoreConfig ¶ added in v1.1.1
func NewColumnStoreConfig() *Config
func NewTsStoreConfig ¶ added in v1.1.0
func NewTsStoreConfig() *Config
func (*Config) GetMaxRowsPerSegment ¶ added in v1.1.0
func (*Config) GetMaxSegmentLimit ¶ added in v1.1.0
func (*Config) SetFilesLimit ¶
func (*Config) SetMaxRowsPerSegment ¶
func (*Config) SetMaxSegmentLimit ¶
type FileIterator ¶
type FileIterator struct {
// contains filtered or unexported fields
}
func NewFileIterator ¶
func NewFileIterator(r TSSPFile, log *Log.Logger) *FileIterator
func (*FileIterator) Close ¶
func (itr *FileIterator) Close()
func (*FileIterator) GetCurtChunkMeta ¶ added in v1.0.0
func (itr *FileIterator) GetCurtChunkMeta() *ChunkMeta
func (*FileIterator) NextChunkMeta ¶
func (itr *FileIterator) NextChunkMeta() bool
func (*FileIterator) WithLog ¶
func (itr *FileIterator) WithLog(log *Log.Logger)
type FileIterators ¶
type FileIterators []*FileIterator
func (FileIterators) AverageRows ¶
func (i FileIterators) AverageRows() int
func (FileIterators) Close ¶
func (i FileIterators) Close()
func (FileIterators) MaxChunkRows ¶
func (i FileIterators) MaxChunkRows() int
func (FileIterators) MaxColumns ¶
func (i FileIterators) MaxColumns() int
type FileReader ¶ added in v1.1.0
type FileReader interface { Open() error Close() error ReadData(cm *ChunkMeta, segment int, dst *record.Record, ctx *ReadContext, ioPriority int) (*record.Record, error) Ref() Unref() int64 MetaIndexAt(idx int) (*MetaIndex, error) MetaIndex(id uint64, tr util.TimeRange) (int, *MetaIndex, error) ChunkMeta(id uint64, offset int64, size, itemCount uint32, metaIdx int, dst *ChunkMeta, buffer *[]byte, ioPriority int) (*ChunkMeta, error) ReadMetaBlock(metaIdx int, id uint64, offset int64, size uint32, count uint32, dst *[]byte, ioPriority int) ([]byte, error) ReadDataBlock(offset int64, size uint32, dst *[]byte, ioPriority int) ([]byte, error) Read(offset int64, size uint32, dst *[]byte, ioPriority int) ([]byte, error) ReadChunkMetaData(metaIdx int, m *MetaIndex, dst []ChunkMeta, ioPriority int) ([]ChunkMeta, error) LoadIdTimes(isOrder bool, p *IdTimePairs) error Stat() *Trailer MinMaxSeriesID() (min, max uint64, err error) MinMaxTime() (min, max int64, err error) Contains(id uint64, tm util.TimeRange) bool ContainsTime(tm util.TimeRange) bool ContainsId(id uint64) bool Name() string FileName() string Rename(newName string) error FileSize() int64 InMemSize() int64 Version() uint64 FreeMemory() int64 FreeFileHandle() error LoadIntoMemory() error LoadComponents() error AverageChunkRows() int MaxChunkRows() int GetFileReaderRef() int64 }
type FilterOptions ¶
type FilterOptions struct {
// contains filtered or unexported fields
}
func NewFilterOpts ¶
func NewFilterOpts(cond influxql.Expr, filterOption *BaseFilterOptions, tags *influx.PointTags, rowFilters *[]clv.RowFilter) *FilterOptions
func (*FilterOptions) GetCond ¶ added in v1.1.0
func (fo *FilterOptions) GetCond() influxql.Expr
func (*FilterOptions) SetCondFuncs ¶ added in v1.1.0
func (fo *FilterOptions) SetCondFuncs(filterOption *BaseFilterOptions)
type FirstLastReader ¶ added in v1.1.0
type FirstLastReader struct {
// contains filtered or unexported fields
}
func (*FirstLastReader) Init ¶ added in v1.1.0
func (r *FirstLastReader) Init(cm *ChunkMeta, cr ColumnReader, ref *record.Field, dst *record.Record, first bool) *FirstLastReader
func (*FirstLastReader) Read ¶ added in v1.1.0
func (r *FirstLastReader) Read(ctx *ReadContext, copied bool, ioPriority int) error
func (*FirstLastReader) Release ¶ added in v1.1.0
func (r *FirstLastReader) Release()
type FloatPreAgg ¶
type FloatPreAgg struct {
// contains filtered or unexported fields
}
FloatPreAgg If you change the order of the elements in the structure, remember to modify marshal() and unmarshal() as well.
func NewFloatPreAgg ¶
func NewFloatPreAgg() *FloatPreAgg
type FragmentIterators ¶ added in v1.1.1
type FragmentIterators struct { SortKeyFileds []record.Field TableData Conf *Config PkRec []*record.Record RecordResult *record.Record // contains filtered or unexported fields }
func (*FragmentIterators) Close ¶ added in v1.1.1
func (f *FragmentIterators) Close()
func (*FragmentIterators) CompareWithBreakPoint ¶ added in v1.1.1
func (f *FragmentIterators) CompareWithBreakPoint(curPos, breakPos int) bool
func (*FragmentIterators) GetBreakPoint ¶ added in v1.1.1
func (f *FragmentIterators) GetBreakPoint()
func (*FragmentIterators) Len ¶ added in v1.1.1
func (f *FragmentIterators) Len() int
func (*FragmentIterators) Less ¶ added in v1.1.1
func (f *FragmentIterators) Less(i, j int) bool
func (*FragmentIterators) NextWithBreakPoint ¶ added in v1.1.1
func (f *FragmentIterators) NextWithBreakPoint()
func (*FragmentIterators) Pop ¶ added in v1.1.1
func (f *FragmentIterators) Pop() interface{}
func (*FragmentIterators) Push ¶ added in v1.1.1
func (f *FragmentIterators) Push(v interface{})
func (*FragmentIterators) Swap ¶ added in v1.1.1
func (f *FragmentIterators) Swap(i, j int)
func (*FragmentIterators) WithLog ¶ added in v1.1.1
func (f *FragmentIterators) WithLog(log *Log.Logger)
type FragmentIteratorsPool ¶ added in v1.1.1
type FragmentIteratorsPool struct {
// contains filtered or unexported fields
}
func NewFragmentIteratorsPool ¶ added in v1.1.1
func NewFragmentIteratorsPool(n int) *FragmentIteratorsPool
type IdTimePairs ¶
func GetIDTimePairs ¶
func GetIDTimePairs(name string) *IdTimePairs
func (*IdTimePairs) Add ¶
func (p *IdTimePairs) Add(id uint64, tm int64)
func (*IdTimePairs) AddRowCounts ¶
func (p *IdTimePairs) AddRowCounts(rowCounts int64)
func (*IdTimePairs) Len ¶
func (p *IdTimePairs) Len() int
func (*IdTimePairs) Marshal ¶
func (p *IdTimePairs) Marshal(encTimes bool, dst []byte, ctx *encoding.CoderContext) []byte
func (*IdTimePairs) Reset ¶
func (p *IdTimePairs) Reset(name string)
type ImmTable ¶ added in v1.1.0
type ImmTable interface { NewFileIterators(m *MmsTables, group *CompactGroup) (FilesInfo, error) AddTSSPFiles(m *MmsTables, name string, isOrder bool, files ...TSSPFile) LevelPlan(m *MmsTables, level uint16) []*CompactGroup SetMstInfo(name string, mstInfo *MeasurementInfo) // contains filtered or unexported methods }
type InMerge ¶
type InMerge struct {
// contains filtered or unexported fields
}
func NewInMerge ¶
func NewInMerge() *InMerge
type IntegerPreAgg ¶
type IntegerPreAgg struct {
// contains filtered or unexported fields
}
IntegerPreAgg If you change the order of the elements in the structure, remember to modify marshal() and unmarshal() as well.
func NewIntegerPreAgg ¶
func NewIntegerPreAgg() *IntegerPreAgg
type Location ¶
type Location struct {
// contains filtered or unexported fields
}
func NewLocation ¶
func NewLocation(r TSSPFile, ctx *ReadContext) *Location
func (*Location) AscendingDone ¶ added in v1.1.0
func (l *Location) AscendingDone()
func (*Location) DescendingDone ¶ added in v1.1.0
func (l *Location) DescendingDone()
func (*Location) GetChunkMeta ¶
func (*Location) SetFragmentRanges ¶ added in v1.1.0
func (l *Location) SetFragmentRanges(frs []*fragment.FragmentRange)
type LocationCursor ¶
type LocationCursor struct {
// contains filtered or unexported fields
}
func NewLocationCursor ¶
func NewLocationCursor(n int) *LocationCursor
func (*LocationCursor) AddFilterRecPool ¶ added in v1.1.0
func (l *LocationCursor) AddFilterRecPool(pool *record.CircularRecordPool)
func (*LocationCursor) AddLocation ¶
func (l *LocationCursor) AddLocation(loc *Location)
func (*LocationCursor) AddRef ¶
func (l *LocationCursor) AddRef()
func (*LocationCursor) Close ¶ added in v1.1.0
func (l *LocationCursor) Close()
func (*LocationCursor) FragmentCount ¶ added in v1.1.0
func (l *LocationCursor) FragmentCount() int
func (*LocationCursor) Len ¶
func (l *LocationCursor) Len() int
func (*LocationCursor) Less ¶
func (l *LocationCursor) Less(i, j int) bool
func (*LocationCursor) ReadData ¶
func (l *LocationCursor) ReadData(filterOpts *FilterOptions, dst *record.Record, filterBitmap *bitmap.FilterBitmap) (*record.Record, error)
func (*LocationCursor) ReadMeta ¶
func (l *LocationCursor) ReadMeta(filterOpts *FilterOptions, dst *record.Record, filterBitmap *bitmap.FilterBitmap) (*record.Record, error)
func (*LocationCursor) ReadOutOfOrderMeta ¶
func (l *LocationCursor) ReadOutOfOrderMeta(filterOpts *FilterOptions, dst *record.Record) (*record.Record, error)
func (*LocationCursor) Reverse ¶
func (l *LocationCursor) Reverse()
func (*LocationCursor) RowCount ¶ added in v1.1.0
func (l *LocationCursor) RowCount() int
func (*LocationCursor) Swap ¶
func (l *LocationCursor) Swap(i, j int)
func (*LocationCursor) Unref ¶
func (l *LocationCursor) Unref()
type MeasurementInfo ¶ added in v1.1.1
type MemBlock ¶
type MemBlock struct {
// contains filtered or unexported fields
}
func (*MemBlock) AppendDataBlock ¶
func (*MemBlock) CopyBlocks ¶
func (mb *MemBlock) CopyBlocks(src MemoryReader)
func (*MemBlock) DataBlocks ¶
func (*MemBlock) DataInMemory ¶
func (*MemBlock) FreeMemory ¶
func (*MemBlock) LoadIntoMemory ¶
func (*MemBlock) MetaBlocks ¶
func (*MemBlock) MetaInMemory ¶
func (*MemBlock) ReadChunkMetaBlock ¶
func (*MemBlock) ReadDataBlock ¶
func (*MemBlock) ReserveDataBlock ¶
func (*MemBlock) ReserveMetaBlock ¶
func (*MemBlock) SetMetaBlocks ¶
type MemoryReader ¶
type MemoryReader interface { AppendDataBlock(srcData []byte) ReadChunkMetaBlock(metaIdx int, sid uint64, count uint32) []byte ReadDataBlock(offset int64, size uint32, dstPtr *[]byte) ([]byte, error) CopyBlocks(src MemoryReader) LoadIntoMemory(dr fileops.BasicFileReader, tr *Trailer, metaIndexItems []MetaIndex) error FreeMemory() int64 DataInMemory() bool MetaInMemory() bool ReserveMetaBlock(n int) ReserveDataBlock(n int) DataBlocks() [][]byte MetaBlocks() [][]byte SetMetaBlocks(blocks [][]byte) Size() int64 Reset() }
func NewMemReader ¶
func NewMemReader() MemoryReader
func NewMemoryReader ¶
func NewMemoryReader(blkSize int) MemoryReader
type MergeColPool ¶ added in v1.1.0
type MergeColPool struct {
// contains filtered or unexported fields
}
func (*MergeColPool) Get ¶ added in v1.1.0
func (p *MergeColPool) Get() *record.ColVal
func (*MergeColPool) Put ¶ added in v1.1.0
func (p *MergeColPool) Put(col *record.ColVal)
type MetaIndex ¶
type MetaIndex struct {
// contains filtered or unexported fields
}
MetaIndex If you change the order of the elements in the structure, remember to modify marshal() and unmarshal() as well.
type MmsIdTime ¶
type MmsIdTime struct {
// contains filtered or unexported fields
}
func NewMmsIdTime ¶
func NewMmsIdTime(sc *SeriesCounter) *MmsIdTime
type MmsReaders ¶
type MmsReaders struct { Orders TableReaders OutOfOrders TableReaders }
type MmsTables ¶
type MmsTables struct { Order map[string]*TSSPFiles // {"cpu_0001": *TSSPFiles} OutOfOrder map[string]*TSSPFiles // {"cpu_0001": *TSSPFiles} CSFiles map[string]*TSSPFiles // {"cpu_0001": *TSSPFiles} tsspFiles for columnStore PKFiles map[string]*colstore.PKFiles // {"cpu_0001": *PKFiles} PKFiles for columnStore ImmTable ImmTable Conf *Config // contains filtered or unexported fields }
func NewTableStore ¶
func (*MmsTables) AddRowCountsBySid ¶
func (*MmsTables) AddTSSPFiles ¶
func (*MmsTables) CompactDone ¶
func (*MmsTables) CompactionDisable ¶
func (m *MmsTables) CompactionDisable()
func (*MmsTables) CompactionEnable ¶
func (m *MmsTables) CompactionEnable()
func (*MmsTables) CompactionEnabled ¶
func (*MmsTables) DisableCompAndMerge ¶ added in v1.0.0
func (m *MmsTables) DisableCompAndMerge()
func (*MmsTables) DropMeasurement ¶
func (*MmsTables) EnableCompAndMerge ¶ added in v1.0.0
func (m *MmsTables) EnableCompAndMerge()
func (*MmsTables) FreeAllMemReader ¶
func (m *MmsTables) FreeAllMemReader()
func (*MmsTables) FreeSequencer ¶ added in v1.0.0
func (*MmsTables) FullCompact ¶
func (*MmsTables) GetBothFilesRef ¶ added in v1.0.0
func (*MmsTables) GetCSFiles ¶ added in v1.1.0
func (*MmsTables) GetFileSeq ¶ added in v1.0.0
func (*MmsTables) GetLastFlushTimeBySid ¶
func (*MmsTables) GetMstFileStat ¶
func (m *MmsTables) GetMstFileStat() *statistics.FileStat
func (*MmsTables) GetOutOfOrderFileNum ¶
func (*MmsTables) GetRowCountsBySid ¶
func (*MmsTables) GetTSSPFiles ¶ added in v1.0.0
func (*MmsTables) IsOutOfOrderFilesExist ¶ added in v1.0.0
func (*MmsTables) Listen ¶ added in v1.0.0
func (m *MmsTables) Listen(signal chan struct{}, onClose func())
func (*MmsTables) MergeDisable ¶
func (m *MmsTables) MergeDisable()
func (*MmsTables) MergeEnable ¶
func (m *MmsTables) MergeEnable()
func (*MmsTables) MergeEnabled ¶
func (*MmsTables) MergeOutOfOrder ¶
func (*MmsTables) NewChunkIterators ¶
func (m *MmsTables) NewChunkIterators(group FilesInfo) (*ChunkIterators, error)
func (*MmsTables) NewStreamIterators ¶
func (m *MmsTables) NewStreamIterators(group FilesInfo) (*StreamIterators, error)
func (*MmsTables) NewStreamWriteFile ¶ added in v1.0.0
func (m *MmsTables) NewStreamWriteFile(mst string) *StreamWriteFile
func (*MmsTables) NextSequence ¶
func (*MmsTables) ReloadSequencer ¶ added in v1.1.0
func (*MmsTables) ReplaceDownSampleFiles ¶ added in v1.0.0
func (*MmsTables) ReplaceFiles ¶
func (*MmsTables) ReplacePKFile ¶ added in v1.1.1
func (*MmsTables) SeriesTotal ¶ added in v1.1.0
func (*MmsTables) SetAddFunc ¶ added in v1.0.0
func (*MmsTables) SetImmTableType ¶ added in v1.1.0
func (m *MmsTables) SetImmTableType(engineType config.EngineType)
func (*MmsTables) SetMstInfo ¶ added in v1.1.1
func (m *MmsTables) SetMstInfo(name string, mstInfo *MeasurementInfo)
type MsBuilder ¶
type MsBuilder struct { Path string TableData Conf *Config MaxIds int Files []TSSPFile FileName TSSPFileName // contains filtered or unexported fields }
func NewMsBuilder ¶ added in v1.1.0
func (*MsBuilder) FileVersion ¶
func (*MsBuilder) GetPKInfoNum ¶ added in v1.1.0
func (*MsBuilder) GetPKMark ¶ added in v1.1.0
func (b *MsBuilder) GetPKMark(i int) fragment.IndexFragment
func (*MsBuilder) GetPKRecord ¶ added in v1.1.0
func (*MsBuilder) MaxRowsPerSegment ¶
func (*MsBuilder) NewPKIndexWriter ¶ added in v1.1.0
func (b *MsBuilder) NewPKIndexWriter()
func (*MsBuilder) SetTCLocation ¶ added in v1.1.1
func (*MsBuilder) StoreTimes ¶ added in v1.1.0
func (b *MsBuilder) StoreTimes()
type PreAggBuilder ¶
type PreAggBuilder interface {
// contains filtered or unexported methods
}
type PreAggBuilders ¶
type PreAggBuilders struct {
// contains filtered or unexported fields
}
func (*PreAggBuilders) Release ¶
func (b *PreAggBuilders) Release()
type QueryfileCache ¶ added in v1.1.0
type QueryfileCache struct {
// contains filtered or unexported fields
}
func GetQueryfileCache ¶ added in v1.1.0
func GetQueryfileCache() *QueryfileCache
func NewQueryfileCache ¶ added in v1.1.0
func NewQueryfileCache(cap uint32) *QueryfileCache
func (*QueryfileCache) Get ¶ added in v1.1.0
func (qfc *QueryfileCache) Get()
func (*QueryfileCache) GetCap ¶ added in v1.1.0
func (qfc *QueryfileCache) GetCap() uint32
func (*QueryfileCache) Put ¶ added in v1.1.0
func (qfc *QueryfileCache) Put(f TSSPFile)
type ReadContext ¶
type ReadContext struct { Ascending bool // contains filtered or unexported fields }
func NewReadContext ¶
func NewReadContext(ascending bool) *ReadContext
func (*ReadContext) GetCoder ¶ added in v1.1.0
func (d *ReadContext) GetCoder() *encoding.CoderContext
func (*ReadContext) GetOps ¶
func (d *ReadContext) GetOps() []*comm.CallOption
func (*ReadContext) GetReadBuff ¶ added in v1.1.0
func (d *ReadContext) GetReadBuff() []byte
func (*ReadContext) InitPreAggBuilder ¶
func (d *ReadContext) InitPreAggBuilder()
func (*ReadContext) MatchPreAgg ¶
func (d *ReadContext) MatchPreAgg() bool
func (*ReadContext) Release ¶
func (d *ReadContext) Release()
func (*ReadContext) Reset ¶
func (d *ReadContext) Reset()
func (*ReadContext) Set ¶
func (d *ReadContext) Set(ascending bool, tr util.TimeRange, onlyFirstOrLast bool, ops []*comm.CallOption)
func (*ReadContext) SetOps ¶
func (d *ReadContext) SetOps(c []*comm.CallOption)
func (*ReadContext) SetSpan ¶ added in v1.1.0
func (d *ReadContext) SetSpan(readSpan, filterSpan *tracing.Span)
func (*ReadContext) SetTr ¶
func (d *ReadContext) SetTr(tr util.TimeRange)
type Segment ¶
type Segment struct {
// contains filtered or unexported fields
}
Segment offset/size/minT/maxT
type SegmentRange ¶
type SegmentRange [2]int64 // min/max
type SegmentReader ¶ added in v1.0.0
type SegmentReader struct {
// contains filtered or unexported fields
}
func NewSegmentReader ¶ added in v1.0.0
func NewSegmentReader(fi *FileIterator) *SegmentReader
type Sequencer ¶
type Sequencer struct {
// contains filtered or unexported fields
}
func NewSequencer ¶
func NewSequencer() *Sequencer
func (*Sequencer) AddRowCounts ¶
func (*Sequencer) BatchUpdateCheckTime ¶
func (s *Sequencer) BatchUpdateCheckTime(p *IdTimePairs, incrRows bool)
func (*Sequencer) DelMmsIdTime ¶ added in v1.1.0
func (*Sequencer) ResetMmsIdTime ¶ added in v1.1.0
func (s *Sequencer) ResetMmsIdTime()
func (*Sequencer) SeriesTotal ¶ added in v1.1.0
func (*Sequencer) SetToInLoading ¶ added in v1.1.0
type SeriesCounter ¶ added in v1.1.0
type SeriesCounter struct {
// contains filtered or unexported fields
}
func (*SeriesCounter) DecrN ¶ added in v1.1.0
func (sc *SeriesCounter) DecrN(n uint64)
func (*SeriesCounter) Get ¶ added in v1.1.0
func (sc *SeriesCounter) Get() uint64
func (*SeriesCounter) Incr ¶ added in v1.1.0
func (sc *SeriesCounter) Incr()
func (*SeriesCounter) Reset ¶ added in v1.1.0
func (sc *SeriesCounter) Reset()
type SortKeyIterator ¶ added in v1.1.1
type SortKeyIterator struct { *FileIterator // contains filtered or unexported fields }
func NewSortKeyIterator ¶ added in v1.1.1
func NewSortKeyIterator(fi *FileIterator, sortKeyFields []record.Field, ctx *ReadContext, schema record.Schemas) (*SortKeyIterator, error)
func (*SortKeyIterator) GetNewRecord ¶ added in v1.1.1
func (s *SortKeyIterator) GetNewRecord() error
func (*SortKeyIterator) NextSingleFragment ¶ added in v1.1.1
func (s *SortKeyIterator) NextSingleFragment(tbStore *MmsTables, f *FragmentIterators, pkSchema record.Schemas) (*record.Record, error)
type StreamIterator ¶
type StreamIterator struct { *FileIterator // contains filtered or unexported fields }
func NewStreamStreamIterator ¶
func NewStreamStreamIterator(fi *FileIterator) *StreamIterator
type StreamIterators ¶
func (*StreamIterators) Close ¶
func (c *StreamIterators) Close()
func (*StreamIterators) FileVersion ¶
func (c *StreamIterators) FileVersion() uint64
func (*StreamIterators) Flush ¶
func (c *StreamIterators) Flush() error
func (*StreamIterators) Init ¶
func (c *StreamIterators) Init(id uint64, chunkDataOffset int64, schema record.Schemas)
func (*StreamIterators) Len ¶
func (c *StreamIterators) Len() int
func (*StreamIterators) Less ¶
func (c *StreamIterators) Less(i, j int) bool
func (*StreamIterators) NewFile ¶
func (c *StreamIterators) NewFile(addFileExt bool) error
func (*StreamIterators) NewTSSPFile ¶
func (c *StreamIterators) NewTSSPFile(tmp bool) (TSSPFile, error)
func (*StreamIterators) Pop ¶
func (c *StreamIterators) Pop() interface{}
func (*StreamIterators) Push ¶
func (c *StreamIterators) Push(v interface{})
func (*StreamIterators) Size ¶
func (c *StreamIterators) Size() int64
func (*StreamIterators) Swap ¶
func (c *StreamIterators) Swap(i, j int)
func (*StreamIterators) WithLog ¶
func (c *StreamIterators) WithLog(log *Log.Logger)
type StreamIteratorsPool ¶
type StreamIteratorsPool struct {
// contains filtered or unexported fields
}
func NewStreamIteratorsPool ¶
func NewStreamIteratorsPool(n int) *StreamIteratorsPool
type StreamWriteFile ¶ added in v1.0.0
func NewWriteScanFile ¶ added in v1.0.0
func (*StreamWriteFile) AppendColumn ¶ added in v1.0.0
func (c *StreamWriteFile) AppendColumn(ref *record.Field) error
func (*StreamWriteFile) ChangeColumn ¶ added in v1.0.0
func (c *StreamWriteFile) ChangeColumn(ref record.Field) error
func (*StreamWriteFile) ChangeSid ¶ added in v1.0.0
func (c *StreamWriteFile) ChangeSid(sid uint64)
func (*StreamWriteFile) Close ¶ added in v1.0.0
func (c *StreamWriteFile) Close(isError bool)
func (*StreamWriteFile) Flush ¶ added in v1.0.0
func (c *StreamWriteFile) Flush() error
func (*StreamWriteFile) GetTSSPFile ¶ added in v1.0.0
func (c *StreamWriteFile) GetTSSPFile() TSSPFile
func (*StreamWriteFile) Init ¶ added in v1.0.0
func (c *StreamWriteFile) Init(id uint64, chunkDataOffset int64, schema record.Schemas)
func (*StreamWriteFile) InitFile ¶ added in v1.0.0
func (c *StreamWriteFile) InitFile(seq uint64) error
func (*StreamWriteFile) InitMergedFile ¶ added in v1.0.0
func (c *StreamWriteFile) InitMergedFile(f TSSPFile) error
func (*StreamWriteFile) NewFile ¶ added in v1.0.0
func (c *StreamWriteFile) NewFile(addFileExt bool) error
func (*StreamWriteFile) NewTSSPFile ¶ added in v1.0.0
func (c *StreamWriteFile) NewTSSPFile(tmp bool) (TSSPFile, error)
func (*StreamWriteFile) SetValidate ¶ added in v1.1.0
func (c *StreamWriteFile) SetValidate(en bool)
func (*StreamWriteFile) Size ¶ added in v1.0.0
func (c *StreamWriteFile) Size() int64
func (*StreamWriteFile) WriteCurrentMeta ¶ added in v1.0.0
func (c *StreamWriteFile) WriteCurrentMeta() error
func (*StreamWriteFile) WriteFile ¶ added in v1.0.0
func (c *StreamWriteFile) WriteFile() error
func (*StreamWriteFile) WriteMeta ¶ added in v1.0.0
func (c *StreamWriteFile) WriteMeta(cm *ChunkMeta) error
type StringPreAgg ¶
type StringPreAgg struct {
// contains filtered or unexported fields
}
StringPreAgg If you change the order of the elements in the structure, remember to modify marshal() and unmarshal() as well.
func NewStringPreAgg ¶
func NewStringPreAgg() *StringPreAgg
type TSSPFile ¶
type TSSPFile interface { Path() string Name() string FileName() TSSPFileName LevelAndSequence() (uint16, uint64) FileNameMerge() uint16 FileNameExtend() uint16 IsOrder() bool Ref() Unref() RefFileReader() UnrefFileReader() Stop() Inuse() bool MetaIndexAt(idx int) (*MetaIndex, error) MetaIndex(id uint64, tr util.TimeRange) (int, *MetaIndex, error) ChunkMeta(id uint64, offset int64, size, itemCount uint32, metaIdx int, dst *ChunkMeta, buffer *[]byte, ioPriority int) (*ChunkMeta, error) ReadAt(cm *ChunkMeta, segment int, dst *record.Record, decs *ReadContext, ioPriority int) (*record.Record, error) ReadData(offset int64, size uint32, dst *[]byte, ioPriority int) ([]byte, error) ReadChunkMetaData(metaIdx int, m *MetaIndex, dst []ChunkMeta, ioPriority int) ([]ChunkMeta, error) FileStat() *Trailer // FileSize get the size of the disk occupied by file FileSize() int64 // InMemSize get the size of the memory occupied by file InMemSize() int64 Contains(id uint64) (bool, error) ContainsByTime(tr util.TimeRange) (bool, error) ContainsValue(id uint64, tr util.TimeRange) (bool, error) MinMaxTime() (int64, int64, error) Open() error Close() error LoadIntoMemory() error LoadComponents() error LoadIdTimes(p *IdTimePairs) error Rename(newName string) error Remove() error FreeMemory(evictLock bool) int64 FreeFileHandle() error Version() uint64 AverageChunkRows() int MaxChunkRows() int MetaIndexItemNum() int64 AddToEvictList(level uint16) RemoveFromEvictList(level uint16) GetFileReaderRef() int64 }
type TSSPFileName ¶
type TSSPFileName struct {
// contains filtered or unexported fields
}
func NewTSSPFileName ¶
func NewTSSPFileName(seq uint64, level, merge, extent uint16, order bool, lockPath *string) TSSPFileName
func (*TSSPFileName) Equal ¶
func (n *TSSPFileName) Equal(other *TSSPFileName) bool
func (*TSSPFileName) ParseFileName ¶
func (n *TSSPFileName) ParseFileName(name string) error
func (*TSSPFileName) SetExtend ¶
func (n *TSSPFileName) SetExtend(extend uint16)
func (*TSSPFileName) SetLevel ¶
func (n *TSSPFileName) SetLevel(l uint16)
func (*TSSPFileName) SetMerge ¶
func (n *TSSPFileName) SetMerge(merge uint16)
func (*TSSPFileName) SetOrder ¶
func (n *TSSPFileName) SetOrder(v bool)
func (*TSSPFileName) SetSeq ¶
func (n *TSSPFileName) SetSeq(seq uint64)
func (*TSSPFileName) String ¶
func (n *TSSPFileName) String() string
func (*TSSPFileName) TmpPath ¶
func (n *TSSPFileName) TmpPath(dir string) string
type TSSPFiles ¶
type TSSPFiles struct {
// contains filtered or unexported fields
}
func NewTSSPFiles ¶
func NewTSSPFiles() *TSSPFiles
type TableReaders ¶
type TableReaders []TSSPFile
func (TableReaders) Len ¶
func (tables TableReaders) Len() int
func (TableReaders) Less ¶
func (tables TableReaders) Less(i, j int) bool
func (TableReaders) Swap ¶
func (tables TableReaders) Swap(i, j int)
type TableStoreGC ¶
type TableStoreGC struct {
// contains filtered or unexported fields
}
func (*TableStoreGC) Add ¶
func (sgc *TableStoreGC) Add(free bool, files ...TSSPFile)
func (*TableStoreGC) GC ¶
func (sgc *TableStoreGC) GC()
type TablesGC ¶
func NewTableStoreGC ¶
func NewTableStoreGC() TablesGC
type TablesStore ¶
type TablesStore interface { SetOpId(shardId uint64, opId uint64) Open() (int64, error) Close() error AddTable(ms *MsBuilder, isOrder bool, tmp bool) AddTSSPFiles(name string, isOrder bool, f ...TSSPFile) AddPKFile(name, file string, rec *record.Record, mark fragment.IndexFragment, tcLocation int8) GetPKFile(mstName string, file string) (pkInfo *colstore.PKInfo, ok bool) FreeAllMemReader() ReplaceFiles(name string, oldFiles, newFiles []TSSPFile, isOrder bool) error GetBothFilesRef(measurement string, hasTimeFilter bool, tr util.TimeRange) ([]TSSPFile, []TSSPFile) ReplaceDownSampleFiles(mstNames []string, originFiles [][]TSSPFile, newFiles [][]TSSPFile, isOrder bool, callBack func()) error NextSequence() uint64 Sequencer() *Sequencer GetTSSPFiles(mm string, isOrder bool) (*TSSPFiles, bool) GetCSFiles(mm string) (*TSSPFiles, bool) Tier() uint64 File(name string, namePath string, isOrder bool) TSSPFile CompactDone(seq []string) CompactionEnable() CompactionDisable() MergeEnable() MergeDisable() CompactionEnabled() bool MergeEnabled() bool IsOutOfOrderFilesExist() bool MergeOutOfOrder(shId uint64, force bool) error LevelCompact(level uint16, shid uint64) error FullCompact(shid uint64) error SetAddFunc(addFunc func(int64)) GetLastFlushTimeBySid(measurement string, sid uint64) int64 GetRowCountsBySid(measurement string, sid uint64) (int64, error) AddRowCountsBySid(measurement string, sid uint64, rowCounts int64) GetOutOfOrderFileNum() int GetMstFileStat() *stats.FileStat DropMeasurement(ctx context.Context, name string) error GetFileSeq() uint64 DisableCompAndMerge() EnableCompAndMerge() FreeSequencer() bool SetImmTableType(engineType config.EngineType) SetMstInfo(name string, mstInfo *MeasurementInfo) SeriesTotal() uint64 }
type TimePreAgg ¶
type TimePreAgg struct {
// contains filtered or unexported fields
}
func NewTimePreAgg ¶
func NewTimePreAgg() *TimePreAgg
type Trailer ¶
type Trailer struct { TableStat // contains filtered or unexported fields }
func (*Trailer) ContainsId ¶
func (*Trailer) MetaIndexItemNum ¶ added in v1.0.0
type UnorderedColumnReader ¶ added in v1.0.0
type UnorderedColumnReader struct {
// contains filtered or unexported fields
}
func (*UnorderedColumnReader) Read ¶ added in v1.0.0
func (r *UnorderedColumnReader) Read(ref *record.Field, maxTime int64) (*record.ColVal, []int64, error)
reads all unordered data whose time is earlier than maxTime
func (*UnorderedColumnReader) ReadSchema ¶ added in v1.0.0
func (r *UnorderedColumnReader) ReadSchema(res map[string]record.Field, maxTime int64)
type UnorderedReader ¶ added in v1.0.0
type UnorderedReader struct {
// contains filtered or unexported fields
}
func NewUnorderedReader ¶ added in v1.0.0
func NewUnorderedReader(log *logger.Logger) *UnorderedReader
func (*UnorderedReader) AddFiles ¶ added in v1.0.0
func (r *UnorderedReader) AddFiles(files []TSSPFile)
func (*UnorderedReader) AllocNilCol ¶ added in v1.1.0
func (*UnorderedReader) Close ¶ added in v1.0.0
func (r *UnorderedReader) Close()
func (*UnorderedReader) HasSeries ¶ added in v1.1.0
func (r *UnorderedReader) HasSeries(sid uint64) bool
func (*UnorderedReader) InitTimes ¶ added in v1.0.1
func (r *UnorderedReader) InitTimes(sid uint64, maxTime int64) error
InitTimes initialize the time column of unordered data
func (*UnorderedReader) Read ¶ added in v1.0.0
func (r *UnorderedReader) Read(sid uint64, ref *record.Field, maxTime int64) (*record.ColVal, []int64, error)
Read reads data based on the series ID, column, and time range
func (*UnorderedReader) ReadAllTimes ¶ added in v1.0.1
func (r *UnorderedReader) ReadAllTimes() []int64
func (*UnorderedReader) ReadRemain ¶ added in v1.0.0
func (r *UnorderedReader) ReadRemain(sid uint64, cb remainCallback) error
ReadRemain reads all remaining data that is smaller than the current series ID in the unordered data
func (*UnorderedReader) ReadSeriesSchemas ¶ added in v1.0.0
func (r *UnorderedReader) ReadSeriesSchemas(sid uint64, maxTime int64) record.Schemas
type UnorderedReaderContext ¶ added in v1.1.0
type UnorderedReaderContext struct {
// contains filtered or unexported fields
}
Source Files ¶
- chunk_iterators.go
- chunkdata_builder.go
- colstore_compact.go
- column_builder.go
- column_iterator.go
- compact.go
- compaction_file_info.go
- config.go
- cs_mms_tables.go
- evict.go
- file_iterator.go
- first_last_reader.go
- limiter.go
- location.go
- location_cursor.go
- mem_reader.go
- merge_out_of_order.go
- merge_performer.go
- merge_tool.go
- merge_util.go
- mms_loader.go
- mms_tables.go
- msbuilder.go
- pre_aggregation.go
- read_context.go
- reader.go
- sequencer.go
- stream_compact.go
- stream_downsample.go
- table.go
- table_stat.go
- trailer.go
- ts_mms_tables.go
- tssp_file.go
- tssp_file_inmem.go
- tssp_file_meta.go
- tssp_file_name.go
- tssp_reader.go
- unordered_reader.go
- util.go
- writer.go