Documentation
¶
Index ¶
- Constants
- func AllocTSSPConvertSource() (bool, func())
- func AllocWalSeq() uint64
- 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 Index
- type IndexCreator
- type MemWalReader
- type Offsets
- type Processor
- type Runner
- func (r *Runner) Close()
- 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, rg *record.MemGroup)
- 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) 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) Wait()
- func (s *Shard) Write(recs []*record.MemRecord) error
- type ShardInfo
- type Wal
- func (wal *Wal) AddSeriesOffsets(sid uint64, offsets ...int64)
- func (wal *Wal) BackgroundSync()
- func (wal *Wal) Clean()
- 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) WriteRecord(sid uint64, seriesKey []byte, rec *record.Record) 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 WalRecordCodec
- func (c *WalRecordCodec) AddValue(s string) int
- func (c *WalRecordCodec) Decode(rec *record.Record, buf []byte) error
- func (c *WalRecordCodec) DecodeColVal(dec *codec.BinaryDecoder, typ int, dst *record.ColVal) error
- func (c *WalRecordCodec) Encode(rec *record.Record, dst []byte) []byte
- func (c *WalRecordCodec) EncodeColVal(cv *record.ColVal, dst []byte) []byte
- func (c *WalRecordCodec) FlushNewDict(w io.Writer) error
- type WalRecordIterator
- type WriterFlusher
Constants ¶
View Source
const DefaultShardFreeDuration = 600 // Second
Variables ¶
This section is empty.
Functions ¶
func AllocTSSPConvertSource ¶
func AllocTSSPConvertSource() (bool, func())
func AllocWalSeq ¶
func AllocWalSeq() uint64
func LZ4CompressBlock ¶
func LZ4DecompressBlock ¶
func ReadRecord ¶
func SnappyCompressBlock ¶
func SnappyDecompressBlock ¶
Types ¶
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) RegisterShard ¶
func (*Processor) UnRegisterShard ¶
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
func (*Runner) RegisterShard ¶
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) 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) 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 WalRecordCodec ¶
type WalRecordCodec struct {
// contains filtered or unexported fields
}
func NewWalRecordCodec ¶
func NewWalRecordCodec() *WalRecordCodec
func (*WalRecordCodec) AddValue ¶
func (c *WalRecordCodec) AddValue(s string) int
func (*WalRecordCodec) Decode ¶
func (c *WalRecordCodec) Decode(rec *record.Record, buf []byte) error
func (*WalRecordCodec) DecodeColVal ¶
func (c *WalRecordCodec) DecodeColVal(dec *codec.BinaryDecoder, typ int, dst *record.ColVal) error
func (*WalRecordCodec) Encode ¶
func (c *WalRecordCodec) Encode(rec *record.Record, dst []byte) []byte
func (*WalRecordCodec) EncodeColVal ¶
func (c *WalRecordCodec) EncodeColVal(cv *record.ColVal, dst []byte) []byte
func (*WalRecordCodec) FlushNewDict ¶
func (c *WalRecordCodec) FlushNewDict(w io.Writer) error
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.