Documentation
¶
Index ¶
- Constants
- func AllocWalSeq() uint64
- func BuildWalCreatedEventKey(info *ShardInfo) string
- func DecrInuseWalCount()
- func EncodeColVal(dst []byte, cv *record.ColVal) []byte
- func EncodeColValRow(dst []byte, typ int, cv *record.ColVal, rowIdx int) []byte
- func EncodeColumnSchema(dst []byte, schema *record.Field) []byte
- func EncodeRecord(dst []byte, rec *record.Record) []byte
- func EncodeRecordRow(dst []byte, rec *record.Record, rowIdx int) []byte
- func IncrInuseWalCount()
- func IsUniqueSorted[S ~[]E, E cmp.Ordered](x S) bool
- func IsWriteLimited() bool
- func LZ4CompressBlock(src, dst []byte) ([]byte, error)
- func LZ4DecompressBlock(src, dst []byte) ([]byte, error)
- func Open()
- func ReadRecord(shardID uint64, mst string, sid uint64, tr *util.TimeRange, ...) *record.Record
- func SnappyCompressBlock(src, dst []byte) []byte
- func SnappyDecompressBlock(src, dst []byte) ([]byte, error)
- func UpdateWriteLimited()
- type Blob
- func (b *Blob) Data() []byte
- func (b *Blob) Done(err error)
- func (b *Blob) Error() error
- func (b *Blob) Hash() uint64
- func (b *Blob) Instance() transport.Codec
- func (b *Blob) IsEmpty() bool
- func (b *Blob) Iterator() *BlobIterator
- func (b *Blob) Marshal(buf []byte) ([]byte, error)
- func (b *Blob) MicroSince() int64
- func (b *Blob) Reset()
- func (b *Blob) ResetTime()
- func (b *Blob) SetShardID(id uint64)
- func (b *Blob) ShardID() uint64
- func (b *Blob) Size() int
- func (b *Blob) TimeRange() *util.TimeRange
- func (b *Blob) Unmarshal(buf []byte) error
- func (b *Blob) WriteRecordRow(seriesKey []byte, rec *record.Record, rowIndex int)
- type BlobGroup
- func (bg *BlobGroup) Error() error
- func (bg *BlobGroup) GetBlobs() []Blob
- func (bg *BlobGroup) GetRecord() *record.Record
- func (bg *BlobGroup) GroupingRow(mst string, seriesKey []byte, rec *record.Record, rowIndex int)
- func (bg *BlobGroup) Init(size int)
- func (bg *BlobGroup) Instance() transport.Codec
- func (bg *BlobGroup) Marshal(buf []byte) ([]byte, error)
- func (bg *BlobGroup) MemSize() int
- func (bg *BlobGroup) Release()
- func (bg *BlobGroup) ResetTime()
- func (bg *BlobGroup) SetBlobs(blobs []Blob)
- func (bg *BlobGroup) Size() int
- func (bg *BlobGroup) Unmarshal(buf []byte) error
- func (bg *BlobGroup) Wait()
- func (bg *BlobGroup) Walk(fn func(blob *Blob))
- type BlobIterator
- type Index
- type IndexCreator
- type IndexCreatorManager
- type Offsets
- type Processor
- type Runner
- func (r *Runner) Close()
- func (r *Runner) ForceFlush(shardID uint64)
- func (r *Runner) GetWALs(shardID uint64, mst string, tr *util.TimeRange) ([]*Wal, func())
- func (r *Runner) IndexCreatorManager() *IndexCreatorManager
- func (r *Runner) RegisterShard(id uint64, info *ShardInfo)
- func (r *Runner) Schedule(shardID uint64, blob *Blob)
- func (r *Runner) ScheduleGroup(shardID uint64, group *BlobGroup) error
- func (r *Runner) Size() int
- func (r *Runner) UnregisterShard(id uint64)
- type SeriesKeyOffsets
- type SeriesMap
- type SeriesOffsets
- type Shard
- func (s *Shard) ConvertToTSSP()
- func (s *Shard) CreateWal() *Wal
- func (s *Shard) ForceFlush()
- func (s *Shard) Free()
- func (s *Shard) GetWalDir() string
- func (s *Shard) GetWalReaders(dst []*Wal, mst string, tr *util.TimeRange) []*Wal
- func (s *Shard) Load()
- func (s *Shard) Run()
- func (s *Shard) Stop()
- func (s *Shard) SwitchWal(wal *Wal, force bool) *Wal
- func (s *Shard) SwitchWalIfNeeded()
- func (s *Shard) UpdateWal(tr *util.TimeRange) *Wal
- func (s *Shard) Wait()
- func (s *Shard) Write(wal *Wal, seriesKey, rec []byte) error
- type ShardInfo
- type Wal
- func (wal *Wal) AddSeriesOffsets(sid uint64, offsets int64)
- func (wal *Wal) AddTargetTSSPFiles(files ...immutable.TSSPFile)
- func (wal *Wal) BackgroundSync()
- func (wal *Wal) Clean()
- func (wal *Wal) EndWrite()
- func (wal *Wal) Expired() bool
- func (wal *Wal) Flush() error
- func (wal *Wal) ForceUnref()
- func (wal *Wal) FreeMemory()
- func (wal *Wal) GetAllSid(dst []uint64) []uint64
- func (wal *Wal) HasMeasurement(mst string) bool
- func (wal *Wal) InMemSize() int64
- func (wal *Wal) LoadFromDisk() error
- func (wal *Wal) MapSeries(mst string, sid uint64)
- func (wal *Wal) MinMaxTime() (int64, int64, error)
- func (wal *Wal) MustClose()
- func (wal *Wal) Name() string
- func (wal *Wal) NeedCreateIndex() bool
- func (wal *Wal) NeedSwitch() bool
- func (wal *Wal) Opened() bool
- func (wal *Wal) Overlaps(min, max int64) bool
- func (wal *Wal) PopSeriesKey() ([]byte, int64, int64)
- func (wal *Wal) PreLoad(name string)
- func (wal *Wal) ReadBlock(ctx *WalCtx, ofs int64) ([]byte, error)
- func (wal *Wal) ReadRecord(ctx *WalCtx, sid uint64, dst *record.Record, keepSchema bool) error
- func (wal *Wal) SizeLimited() bool
- func (wal *Wal) Sync() error
- func (wal *Wal) TargetContain(files ...immutable.TSSPFile) bool
- func (wal *Wal) UpdateTimeRange(tr *util.TimeRange)
- func (wal *Wal) WriteRecord(sid uint64, seriesKey []byte, rec []byte) error
- func (wal *Wal) WrittenSize() int64
- type WalBlockHeader
- type WalConsumeReader
- type WalCreatedEvent
- type WalCtx
- type WalFile
- func (wf *WalFile) Close() error
- func (wf *WalFile) Flush() error
- func (wf *WalFile) IsClosed() bool
- func (wf *WalFile) LoadIntoMemory()
- func (wf *WalFile) Name() string
- func (wf *WalFile) Open() error
- func (wf *WalFile) OpenReadonly() error
- func (wf *WalFile) Read(dst []byte) (int, error)
- func (wf *WalFile) ReadAt(dst []byte, ofs int64) (int, error)
- func (wf *WalFile) ReadFull(dst []byte) (int, error)
- func (wf *WalFile) Seek(offset int64, whence int) (int64, error)
- func (wf *WalFile) Sync() error
- func (wf *WalFile) Write(b []byte) (int, error)
- func (wf *WalFile) WrittenSize() int64
- type WalFileHot
- type WalIterator
- type WalIterators
- type WalReader
- type WalRecordDecoder
- func (c *WalRecordDecoder) Decode(rec *record.Record, buf []byte) error
- func (c *WalRecordDecoder) DecodeColVal(typ int, col *record.ColVal) error
- func (c *WalRecordDecoder) DecodeColValOneRowMode(typ int, col *record.ColVal)
- func (c *WalRecordDecoder) DecodeColumnSchema(dst *record.Field)
- func (c *WalRecordDecoder) Reset(buf []byte)
- type WalRecordIterator
- type WriterFlusher
Constants ¶
View Source
const ( RecordEncodeModeOneRow = 1 RecordEncodeModeFull = 2 )
View Source
const DefaultShardFreeDuration = 600 // Second
Variables ¶
This section is empty.
Functions ¶
func AllocWalSeq ¶
func AllocWalSeq() uint64
func BuildWalCreatedEventKey ¶ added in v1.5.0
func DecrInuseWalCount ¶ added in v1.5.2
func DecrInuseWalCount()
func EncodeColValRow ¶ added in v1.4.1
func EncodeColumnSchema ¶ added in v1.4.1
func EncodeRecordRow ¶ added in v1.4.1
func IncrInuseWalCount ¶ added in v1.5.2
func IncrInuseWalCount()
func IsUniqueSorted ¶ added in v1.4.1
func IsWriteLimited ¶ added in v1.5.2
func IsWriteLimited() bool
func LZ4CompressBlock ¶
func LZ4DecompressBlock ¶
func ReadRecord ¶
func SnappyCompressBlock ¶
func SnappyDecompressBlock ¶
func UpdateWriteLimited ¶ added in v1.5.2
func UpdateWriteLimited()
Types ¶
type Blob ¶ added in v1.4.1
type Blob struct {
// contains filtered or unexported fields
}
func (*Blob) Iterator ¶ added in v1.4.1
func (b *Blob) Iterator() *BlobIterator
func (*Blob) MicroSince ¶ added in v1.4.1
func (*Blob) SetShardID ¶ added in v1.4.1
type BlobGroup ¶ added in v1.4.1
type BlobGroup struct {
// contains filtered or unexported fields
}
func NewBlobGroup ¶ added in v1.4.1
func (*BlobGroup) GroupingRow ¶ added in v1.4.1
type BlobIterator ¶ added in v1.4.1
type BlobIterator struct {
// contains filtered or unexported fields
}
func NewBlobIterator ¶ added in v1.4.1
func NewBlobIterator(data []byte) *BlobIterator
type IndexCreator ¶
type IndexCreator struct {
// contains filtered or unexported fields
}
func (*IndexCreator) Create ¶
func (c *IndexCreator) Create(wal *Wal)
type IndexCreatorManager ¶ added in v1.5.0
type IndexCreatorManager struct {
// contains filtered or unexported fields
}
func NewIndexCreatorManager ¶ added in v1.5.0
func NewIndexCreatorManager() *IndexCreatorManager
func (*IndexCreatorManager) Alloc ¶ added in v1.5.0
func (icm *IndexCreatorManager) Alloc(idx Index) *IndexCreator
func (*IndexCreatorManager) Recycle ¶ added in v1.5.0
func (icm *IndexCreatorManager) Recycle(creator *IndexCreator)
type Processor ¶
type Processor struct {
// contains filtered or unexported fields
}
func (*Processor) ForceFlush ¶ added in v1.4.1
func (*Processor) RegisterShard ¶
func (*Processor) UnRegisterShard ¶
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
func (*Runner) ForceFlush ¶ added in v1.4.1
func (*Runner) IndexCreatorManager ¶ added in v1.5.0
func (r *Runner) IndexCreatorManager() *IndexCreatorManager
func (*Runner) RegisterShard ¶
func (*Runner) ScheduleGroup ¶ added in v1.4.1
func (*Runner) UnregisterShard ¶
type SeriesKeyOffsets ¶
type SeriesKeyOffsets struct {
// contains filtered or unexported fields
}
func NewSeriesKeyOffsets ¶
func NewSeriesKeyOffsets() *SeriesKeyOffsets
func (*SeriesKeyOffsets) Add ¶
func (o *SeriesKeyOffsets) Add(key []byte, ofs int64)
func (*SeriesKeyOffsets) Len ¶
func (o *SeriesKeyOffsets) Len() int
type SeriesMap ¶ added in v1.5.0
type SeriesMap struct {
// contains filtered or unexported fields
}
func NewSeriesMap ¶ added in v1.5.0
func NewSeriesMap() *SeriesMap
func (*SeriesMap) GetSeriesIDs ¶ added in v1.5.0
func (*SeriesMap) HasMeasurement ¶ added in v1.5.0
type SeriesOffsets ¶
type SeriesOffsets struct {
// contains filtered or unexported fields
}
func NewSeriesOffsets ¶
func NewSeriesOffsets() *SeriesOffsets
func (*SeriesOffsets) Add ¶
func (o *SeriesOffsets) Add(key uint64, ofs int64)
func (*SeriesOffsets) GetAllKeyNoLock ¶
func (o *SeriesOffsets) GetAllKeyNoLock(dst []uint64) []uint64
type Shard ¶
type Shard struct {
// contains filtered or unexported fields
}
func (*Shard) ConvertToTSSP ¶ added in v1.5.0
func (s *Shard) ConvertToTSSP()
func (*Shard) ForceFlush ¶ added in v1.4.1
func (s *Shard) ForceFlush()
func (*Shard) GetWalReaders ¶
func (*Shard) SwitchWalIfNeeded ¶ added in v1.5.0
func (s *Shard) SwitchWalIfNeeded()
type ShardInfo ¶
type ShardInfo struct {
// contains filtered or unexported fields
}
func NewShardInfo ¶
func NewShardInfo(ident *meta.ShardIdentifier, filePath, walPath string, lock *string, tbStore immutable.TablesStore, index Index, options *obs.ObsOptions) *ShardInfo
type Wal ¶
func (*Wal) AddSeriesOffsets ¶
func (*Wal) AddTargetTSSPFiles ¶ added in v1.5.0
func (*Wal) BackgroundSync ¶
func (wal *Wal) BackgroundSync()
func (*Wal) ForceUnref ¶ added in v1.5.0
func (wal *Wal) ForceUnref()
func (*Wal) FreeMemory ¶ added in v1.5.0
func (wal *Wal) FreeMemory()
func (*Wal) HasMeasurement ¶ added in v1.5.0
func (*Wal) LoadFromDisk ¶ added in v1.5.0
func (*Wal) NeedCreateIndex ¶
func (*Wal) NeedSwitch ¶ added in v1.5.0
func (*Wal) ReadRecord ¶
func (*Wal) SizeLimited ¶
func (*Wal) TargetContain ¶ added in v1.5.0
func (*Wal) UpdateTimeRange ¶ added in v1.4.1
func (*Wal) WriteRecord ¶
func (*Wal) WrittenSize ¶
type WalBlockHeader ¶
type WalBlockHeader struct {
// contains filtered or unexported fields
}
func (*WalBlockHeader) Put ¶
func (h *WalBlockHeader) Put(dst []byte)
func (*WalBlockHeader) Set ¶
func (h *WalBlockHeader) Set(size int, mstLen int, typeFlag, compressFlag uint8, sid uint64)
func (*WalBlockHeader) Unmarshal ¶
func (h *WalBlockHeader) Unmarshal(src []byte) error
type WalConsumeReader ¶ added in v1.5.0
type WalConsumeReader struct {
// contains filtered or unexported fields
}
func NewWalConsumeReader ¶ added in v1.5.0
func NewWalConsumeReader(wal *Wal, ctx *WalCtx, wantTable string, ofs int64) *WalConsumeReader
func (*WalConsumeReader) ReadBlock ¶ added in v1.5.0
func (wcr *WalConsumeReader) ReadBlock() (sid uint64, seriesKey []byte, recData []byte, err error)
func (*WalConsumeReader) Release ¶ added in v1.5.0
func (wcr *WalConsumeReader) Release()
type WalCreatedEvent ¶ added in v1.5.0
func (*WalCreatedEvent) CreateIterator ¶ added in v1.5.0
func (e *WalCreatedEvent) CreateIterator(mst string) record.RecIterator
func (*WalCreatedEvent) Ref ¶ added in v1.5.0
func (e *WalCreatedEvent) Ref()
func (*WalCreatedEvent) UnRef ¶ added in v1.5.0
func (e *WalCreatedEvent) UnRef()
func (*WalCreatedEvent) UniqueId ¶ added in v1.5.0
func (e *WalCreatedEvent) UniqueId() uint64
type WalFile ¶
type WalFile struct {
WalFileHot
// contains filtered or unexported fields
}
func NewWalFile ¶
func (*WalFile) LoadIntoMemory ¶
func (wf *WalFile) LoadIntoMemory()
func (*WalFile) OpenReadonly ¶ added in v1.5.0
func (*WalFile) WrittenSize ¶
type WalFileHot ¶ added in v1.5.0
type WalFileHot struct {
// contains filtered or unexported fields
}
func (*WalFileHot) FreeMemory ¶ added in v1.5.0
func (wf *WalFileHot) FreeMemory()
func (*WalFileHot) InMemSize ¶ added in v1.5.0
func (wf *WalFileHot) InMemSize() int64
func (*WalFileHot) OpenMemFile ¶ added in v1.5.0
func (wf *WalFileHot) OpenMemFile()
type WalIterator ¶ added in v1.5.0
type WalIterator struct {
// contains filtered or unexported fields
}
WalIterator iterator single wal file
func NewWalIterator ¶ added in v1.5.0
func NewWalIterator(wal *Wal, mst string, idx Index) *WalIterator
func (*WalIterator) Release ¶ added in v1.5.0
func (it *WalIterator) Release()
type WalIterators ¶ added in v1.5.0
WalIterators iterates multiple WAL files
func NewWalIterators ¶ added in v1.5.0
func (*WalIterators) AddIterator ¶ added in v1.5.0
func (its *WalIterators) AddIterator(itr record.RecIterator)
func (*WalIterators) Next ¶ added in v1.5.0
func (its *WalIterators) Next() (*record.ConsumeRecord, error)
Next return ConsumeRecord from files of wal
func (*WalIterators) Release ¶ added in v1.5.0
func (its *WalIterators) Release()
func (*WalIterators) RemoveFilterColumns ¶ added in v1.5.0
RemoveFilterColumns Remove the redundant columns used for filtering
type WalReader ¶ added in v1.4.1
type WalReader struct {
// contains filtered or unexported fields
}
func NewWalReader ¶ added in v1.4.1
type WalRecordDecoder ¶ added in v1.4.1
type WalRecordDecoder struct {
// contains filtered or unexported fields
}
func NewWalRecordDecoder ¶ added in v1.4.1
func NewWalRecordDecoder() *WalRecordDecoder
func (*WalRecordDecoder) Decode ¶ added in v1.4.1
func (c *WalRecordDecoder) Decode(rec *record.Record, buf []byte) error
func (*WalRecordDecoder) DecodeColVal ¶ added in v1.4.1
func (c *WalRecordDecoder) DecodeColVal(typ int, col *record.ColVal) error
func (*WalRecordDecoder) DecodeColValOneRowMode ¶ added in v1.4.1
func (c *WalRecordDecoder) DecodeColValOneRowMode(typ int, col *record.ColVal)
func (*WalRecordDecoder) DecodeColumnSchema ¶ added in v1.4.1
func (c *WalRecordDecoder) DecodeColumnSchema(dst *record.Field)
func (*WalRecordDecoder) Reset ¶ added in v1.5.0
func (c *WalRecordDecoder) Reset(buf []byte)
type WalRecordIterator ¶
type WalRecordIterator struct {
// contains filtered or unexported fields
}
func NewWalRecordIterator ¶ added in v1.5.0
func NewWalRecordIterator(wal *Wal) (*WalRecordIterator, func())
func (*WalRecordIterator) Next ¶
func (itr *WalRecordIterator) Next(dst *record.Record) (uint64, error)
func (*WalRecordIterator) SetSeries ¶ added in v1.5.0
func (itr *WalRecordIterator) SetSeries(series map[uint64]struct{})
type WriterFlusher ¶
Click to show internal directories.
Click to hide internal directories.