Documentation
¶
Index ¶
- Constants
- func AllocTSSPConvertSource() (bool, func())
- func AllocWalSeq() uint64
- 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 IsUniqueSorted[S ~[]E, E cmp.Ordered](x S) 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)
- type Blob
- func (b *Blob) Done(err error)
- func (b *Blob) Error() error
- func (b *Blob) Hash() uint64
- func (b *Blob) IsEmpty() bool
- func (b *Blob) Iterator() *BlobIterator
- 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) TimeRange() *util.TimeRange
- func (b *Blob) WriteRecordRow(seriesKey []byte, rec *record.Record, rowIndex int)
- type BlobGroup
- type BlobIterator
- type Index
- type IndexCreator
- type MemWalReader
- 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) 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 SeriesOffsets
- type Shard
- func (s *Shard) AsyncConvertToTSSP()
- func (s *Shard) AsyncCreateIndex()
- func (s *Shard) CreateWal(mst string) *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) UpdateWal(wal *Wal, seriesKey []byte, tr *util.TimeRange) (*Wal, error)
- 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) BackgroundSync()
- func (wal *Wal) Clean()
- func (wal *Wal) Converted() bool
- func (wal *Wal) EndWrite()
- func (wal *Wal) Expired() bool
- func (wal *Wal) Flush() error
- func (wal *Wal) GetAllSid(dst []uint64) []uint64
- func (wal *Wal) Load(name string) error
- func (wal *Wal) LoadIntoMemory()
- func (wal *Wal) MustClose()
- func (wal *Wal) Name() string
- func (wal *Wal) NeedCreateIndex() bool
- func (wal *Wal) Opened() bool
- func (wal *Wal) PopSeriesKey() ([]byte, int64)
- func (wal *Wal) ReadBlock(ctx *WalCtx, ofs int64) ([]byte, error)
- func (wal *Wal) ReadRecord(ctx *WalCtx, sid uint64, dst *record.Record) error
- func (wal *Wal) SizeLimited() bool
- func (wal *Wal) Sync() error
- 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 WalCtx
- type WalFile
- func (wf *WalFile) Close() error
- func (wf *WalFile) Flush() error
- func (wf *WalFile) LoadIntoMemory()
- func (wf *WalFile) Name() string
- func (wf *WalFile) Open(flag int) error
- func (wf *WalFile) ReadAt(dst []byte, ofs int64) (int, error)
- func (wf *WalFile) Sync() error
- func (wf *WalFile) Write(b []byte) (int, error)
- func (wf *WalFile) WrittenSize() int64
- type WalReader
- type WalRecordDecoder
- func (c *WalRecordDecoder) Decode(rec *record.Record, buf []byte) error
- func (c *WalRecordDecoder) DecodeColVal(dec *codec.BinaryDecoder, typ int, col *record.ColVal) error
- func (c *WalRecordDecoder) DecodeColValOneRowMode(dec *codec.BinaryDecoder, typ int, col *record.ColVal)
- func (c *WalRecordDecoder) DecodeColumnSchema(dec *codec.BinaryDecoder, dst *record.Field)
- 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 AllocTSSPConvertSource ¶
func AllocTSSPConvertSource() (bool, func())
func AllocWalSeq ¶
func AllocWalSeq() uint64
func EncodeColValRow ¶ added in v1.4.1
func EncodeColumnSchema ¶ added in v1.4.1
func EncodeRecordRow ¶ added in v1.4.1
func IsUniqueSorted ¶ added in v1.4.1
func LZ4CompressBlock ¶
func LZ4DecompressBlock ¶
func ReadRecord ¶
func SnappyCompressBlock ¶
func SnappyDecompressBlock ¶
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 MemWalReader ¶
type MemWalReader struct {
// contains filtered or unexported fields
}
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) 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
func (*SeriesKeyOffsets) Pop ¶
func (o *SeriesKeyOffsets) Pop() ([]byte, int64)
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) Get ¶
func (o *SeriesOffsets) Get(sid uint64) []int64
func (*SeriesOffsets) GetAllKeyNoLock ¶
func (o *SeriesOffsets) GetAllKeyNoLock(dst []uint64) []uint64
type Shard ¶
type Shard struct {
// contains filtered or unexported fields
}
func (*Shard) AsyncConvertToTSSP ¶
func (s *Shard) AsyncConvertToTSSP()
func (*Shard) AsyncCreateIndex ¶
func (s *Shard) AsyncCreateIndex()
func (*Shard) ForceFlush ¶ added in v1.4.1
func (s *Shard) ForceFlush()
func (*Shard) GetWalReaders ¶
type ShardInfo ¶
type ShardInfo struct {
// contains filtered or unexported fields
}
func NewShardInfo ¶
func NewShardInfo(ident *meta.ShardIdentifier, filePath string, lock *string, tbStore immutable.TablesStore, index Index) *ShardInfo
type Wal ¶
func (*Wal) AddSeriesOffsets ¶
func (*Wal) BackgroundSync ¶
func (wal *Wal) BackgroundSync()
func (*Wal) LoadIntoMemory ¶
func (wal *Wal) LoadIntoMemory()
func (*Wal) NeedCreateIndex ¶
func (*Wal) PopSeriesKey ¶
func (*Wal) ReadRecord ¶
func (*Wal) SizeLimited ¶
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) Unmarshal ¶
func (h *WalBlockHeader) Unmarshal(src []byte) error
type WalFile ¶
type WalFile struct {
// contains filtered or unexported fields
}
func NewWalFile ¶
func (*WalFile) LoadIntoMemory ¶
func (wf *WalFile) LoadIntoMemory()
func (*WalFile) WrittenSize ¶
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 {
}
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(dec *codec.BinaryDecoder, typ int, col *record.ColVal) error
func (*WalRecordDecoder) DecodeColValOneRowMode ¶ added in v1.4.1
func (c *WalRecordDecoder) DecodeColValOneRowMode(dec *codec.BinaryDecoder, typ int, col *record.ColVal)
func (*WalRecordDecoder) DecodeColumnSchema ¶ added in v1.4.1
func (c *WalRecordDecoder) DecodeColumnSchema(dec *codec.BinaryDecoder, dst *record.Field)
type WalRecordIterator ¶
type WalRecordIterator struct {
// contains filtered or unexported fields
}
func (*WalRecordIterator) Init ¶
func (itr *WalRecordIterator) Init(wal *Wal)
type WriterFlusher ¶
Click to show internal directories.
Click to hide internal directories.