Documentation
¶
Index ¶
- Constants
- func AppendPKIndexSuffix(dataPath string) string
- func AppendSecondaryIndexSuffix(dataPath string, fieldName string, indexType index.IndexType, fileType int) string
- func BuildPkRecord(dec *codec.BinaryDecoder, rec *record.Record, buf []byte)
- func ColValBytesAtRow(cv *record.ColVal, i int, typ int) ([]byte, bool)
- func FetchKeyAtRow(dst []byte, cols []*record.ColVal, schema record.Schemas, rowNum int, ...) []byte
- func InitDecFunctions()
- func MarshalPkMetaBlock(startId, endId uint64, offset, size uint32, meta, colsOffset []byte) []byte
- func OnlySortByTime(sk record.Schemas) bool
- type ChunkBuilder
- type ClusterIndex
- type ColValPicker
- type ColumnBuilder
- type DetachedPKData
- type DetachedPKInfo
- type DetachedPKMeta
- type DetachedPKMetaInfo
- type IndexBuilder
- func (b *IndexBuilder) GetEncodeChunkSize() uint32
- func (b *IndexBuilder) Reset()
- func (b *IndexBuilder) WriteData(rec *record.Record, tcLocation int8) error
- func (b *IndexBuilder) WriteDetachedData(rec *record.Record, tcLocation int8) error
- func (b *IndexBuilder) WriteDetachedMeta(startId, endId uint64, offset, size uint32, fd fileops.File) error
- type IndexWriter
- type KeySorter
- type LinePicker
- type Measurement
- func (m *Measurement) BuildPKMap() map[string]struct{}
- func (m *Measurement) ColStoreInfo() *meta.ColStoreInfo
- func (m *Measurement) IndexRelation() *influxql.IndexRelation
- func (m *Measurement) IsUniqueEnabled() bool
- func (m *Measurement) MeasurementInfo() *meta.MeasurementInfo
- func (m *Measurement) PrimaryKey() []record.Field
- func (m *Measurement) SortKey() []record.Field
- func (m *Measurement) TCDuration() int64
- func (m *Measurement) TCLocation() int8
- type MeasurementIdent
- type MstManager
- func (m *MstManager) Add(ident MeasurementIdent, mi *meta.MeasurementInfo)
- func (m *MstManager) Clear()
- func (m *MstManager) Del(ident MeasurementIdent)
- func (m *MstManager) DelAll(db, rp string)
- func (m *MstManager) Exists(ident MeasurementIdent) bool
- func (m *MstManager) Get(db, rp, name string) (*Measurement, bool)
- func (m *MstManager) GetByIdent(ident MeasurementIdent) (*Measurement, bool)
- type OffsetKeySorter
- type Offsets
- type OffsetsMap
- type PKInfo
- func (p *PKInfo) BuildColumnMap()
- func (p *PKInfo) GetClusterIndex() ClusterIndex
- func (p *PKInfo) GetColumnMap() map[string]int
- func (p *PKInfo) GetMark() fragment.IndexFragment
- func (p *PKInfo) GetPkType() string
- func (p *PKInfo) GetRec() *record.Record
- func (p *PKInfo) GetTCLocation() int8
- func (p *PKInfo) IsClusterIndex() bool
- func (p *PKInfo) SetClusterIndex(ci ClusterIndex)
- func (p *PKInfo) SetPkType(typ string)
- func (p *PKInfo) SetRec(rec *record.Record)
- type PkMetaBlock
- type PrimaryKeyFetcher
- type PrimaryKeyReader
- func (r *PrimaryKeyReader) Close() error
- func (r *PrimaryKeyReader) FileSize() int64
- func (r *PrimaryKeyReader) Open() error
- func (r *PrimaryKeyReader) Read(offset int64, size uint32, dst *[]byte) ([]byte, error)
- func (r *PrimaryKeyReader) ReadData() (*record.Record, int8, error)
- func (r *PrimaryKeyReader) Version() uint32
- type SkipIndexInfo
- type UniquePicker
Constants ¶
View Source
const ( PKMetaPrefixSize = util.Uint64SizeBytes*2 + util.Uint32SizeBytes*2 CRCLen = 4 )
View Source
const ( CoarseIndexFragment int = 8 MinRowsForSeek int = 0 IndexFileSuffix string = ".idx" MinMaxIndexFileSuffix string = ".mm" SetIndexFileSuffix string = ".set" BloomFilterIndexFileSuffix string = ".bf" TextIndexDataFileSuffix string = ".pos" // posting list TextIndexHeadFileSuffix string = ".bh" // block header TextIndexPartFileSuffix string = ".ph" // part header DefaultTCLocation int8 = -1 TCLocationUsed int8 = 1 SeriesID uint64 = 1 DefaultTCDuration = time.Hour MinTCDuration = time.Minute * 10 )
View Source
const ( TextIndexData = iota TextIndexHead TextIndexPart TextIndexMax DefaultFileType )
Variables ¶
This section is empty.
Functions ¶
func AppendPKIndexSuffix ¶ added in v1.2.0
func AppendSecondaryIndexSuffix ¶ added in v1.3.0
func BuildPkRecord ¶ added in v1.5.0
func BuildPkRecord(dec *codec.BinaryDecoder, rec *record.Record, buf []byte)
func ColValBytesAtRow ¶ added in v1.5.0
func FetchKeyAtRow ¶ added in v1.5.0
func InitDecFunctions ¶
func InitDecFunctions()
func MarshalPkMetaBlock ¶ added in v1.3.0
func OnlySortByTime ¶ added in v1.5.0
Types ¶
type ChunkBuilder ¶
type ChunkBuilder struct {
// contains filtered or unexported fields
}
func NewChunkBuilder ¶
func NewChunkBuilder() *ChunkBuilder
func (*ChunkBuilder) EncodeChunk ¶
type ClusterIndex ¶ added in v1.5.0
type ColValPicker ¶ added in v1.5.0
type ColValPicker interface {
Pick(src *record.ColVal, typ, start, end int) (*record.ColVal, *record.ColVal)
IteratorSegment(maxRowsPreSeg int, fn func(start, end int) bool)
}
func NewColValPicker ¶ added in v1.5.0
func NewColValPicker(oks *OffsetKeySorter, unique bool) ColValPicker
type ColumnBuilder ¶
type ColumnBuilder struct {
// contains filtered or unexported fields
}
func NewColumnBuilder ¶
func NewColumnBuilder() *ColumnBuilder
func (*ColumnBuilder) EncodeColumn ¶
type DetachedPKData ¶ added in v1.2.0
type DetachedPKData struct {
Offset int64 // temporary variable, used for sorting
Data *record.Record
}
func (*DetachedPKData) Unmarshal ¶ added in v1.2.0
func (m *DetachedPKData) Unmarshal(src []byte, meta *DetachedPKMeta, info *DetachedPKMetaInfo) ([]byte, error)
type DetachedPKInfo ¶ added in v1.2.0
type DetachedPKInfo struct {
StartBlockId uint64
EndBlockId uint64
TcLocation int8
Data *record.Record
}
func GetPKInfoByPKMetaData ¶ added in v1.2.0
func GetPKInfoByPKMetaData(meta *DetachedPKMeta, data *DetachedPKData, tcLocation int8) *DetachedPKInfo
func (*DetachedPKInfo) GetEndBlockId ¶ added in v1.3.0
func (d *DetachedPKInfo) GetEndBlockId() uint64
func (*DetachedPKInfo) GetStartBlockId ¶ added in v1.3.0
func (d *DetachedPKInfo) GetStartBlockId() uint64
func (*DetachedPKInfo) IsBlockExist ¶ added in v1.3.0
func (d *DetachedPKInfo) IsBlockExist(start, end uint64) bool
type DetachedPKMeta ¶ added in v1.2.0
type DetachedPKMeta struct {
StartBlockId uint64
EndBlockId uint64
Offset uint32
Length uint32
ColOffset []byte
}
func (*DetachedPKMeta) Size ¶ added in v1.2.0
func (m *DetachedPKMeta) Size() int
type DetachedPKMetaInfo ¶ added in v1.2.0
func (*DetachedPKMetaInfo) Size ¶ added in v1.2.0
func (m *DetachedPKMetaInfo) Size() int
func (*DetachedPKMetaInfo) Unmarshal ¶ added in v1.2.0
func (m *DetachedPKMetaInfo) Unmarshal(src []byte) ([]byte, error)
func (*DetachedPKMetaInfo) UnmarshalPublicSize ¶ added in v1.2.0
func (m *DetachedPKMetaInfo) UnmarshalPublicSize(src []byte) ([]byte, error)
type IndexBuilder ¶
type IndexBuilder struct {
// contains filtered or unexported fields
}
func NewIndexBuilder ¶
func NewIndexBuilder(lockPath *string, filePath string) *IndexBuilder
func NewIndexBuilderByFd ¶ added in v1.2.0
func NewIndexBuilderByFd(lockPath *string, fd fileops.File, firstFlush bool) *IndexBuilder
func (*IndexBuilder) GetEncodeChunkSize ¶ added in v1.2.0
func (b *IndexBuilder) GetEncodeChunkSize() uint32
func (*IndexBuilder) Reset ¶
func (b *IndexBuilder) Reset()
func (*IndexBuilder) WriteData ¶
func (b *IndexBuilder) WriteData(rec *record.Record, tcLocation int8) error
func (*IndexBuilder) WriteDetachedData ¶ added in v1.2.0
func (b *IndexBuilder) WriteDetachedData(rec *record.Record, tcLocation int8) error
func (*IndexBuilder) WriteDetachedMeta ¶ added in v1.2.0
type IndexWriter ¶ added in v1.3.0
type IndexWriter struct {
// contains filtered or unexported fields
}
func NewIndexWriter ¶ added in v1.3.0
func NewIndexWriter(lockPath *string, filePath string) (*IndexWriter, error)
func (*IndexWriter) FileName ¶ added in v1.5.0
func (b *IndexWriter) FileName() string
func (*IndexWriter) Reset ¶ added in v1.3.0
func (b *IndexWriter) Reset()
func (*IndexWriter) WriteData ¶ added in v1.3.0
func (b *IndexWriter) WriteData(data []byte) error
type KeySorter ¶ added in v1.5.0
type KeySorter struct {
Keys [][]byte
// contains filtered or unexported fields
}
type LinePicker ¶ added in v1.5.0
type LinePicker struct {
// contains filtered or unexported fields
}
func (*LinePicker) IteratorSegment ¶ added in v1.5.0
func (p *LinePicker) IteratorSegment(maxRowsPreSeg int, fn func(start, end int) bool)
type Measurement ¶ added in v1.5.0
type Measurement struct {
// contains filtered or unexported fields
}
func (*Measurement) BuildPKMap ¶ added in v1.5.0
func (m *Measurement) BuildPKMap() map[string]struct{}
func (*Measurement) ColStoreInfo ¶ added in v1.5.0
func (m *Measurement) ColStoreInfo() *meta.ColStoreInfo
func (*Measurement) IndexRelation ¶ added in v1.5.0
func (m *Measurement) IndexRelation() *influxql.IndexRelation
func (*Measurement) IsUniqueEnabled ¶ added in v1.5.0
func (m *Measurement) IsUniqueEnabled() bool
func (*Measurement) MeasurementInfo ¶ added in v1.5.0
func (m *Measurement) MeasurementInfo() *meta.MeasurementInfo
func (*Measurement) PrimaryKey ¶ added in v1.5.0
func (m *Measurement) PrimaryKey() []record.Field
func (*Measurement) SortKey ¶ added in v1.5.0
func (m *Measurement) SortKey() []record.Field
func (*Measurement) TCDuration ¶ added in v1.5.0
func (m *Measurement) TCDuration() int64
func (*Measurement) TCLocation ¶ added in v1.5.0
func (m *Measurement) TCLocation() int8
type MeasurementIdent ¶ added in v1.5.0
func NewMeasurementIdent ¶ added in v1.5.0
func NewMeasurementIdent(db, rp string) MeasurementIdent
func (*MeasurementIdent) SetName ¶ added in v1.5.0
func (t *MeasurementIdent) SetName(name string)
func (*MeasurementIdent) SetSafeName ¶ added in v1.5.0
func (t *MeasurementIdent) SetSafeName(name string)
func (*MeasurementIdent) String ¶ added in v1.5.0
func (t *MeasurementIdent) String() string
type MstManager ¶ added in v1.5.0
type MstManager struct {
// contains filtered or unexported fields
}
func MstManagerIns ¶ added in v1.5.0
func MstManagerIns() *MstManager
func (*MstManager) Add ¶ added in v1.5.0
func (m *MstManager) Add(ident MeasurementIdent, mi *meta.MeasurementInfo)
func (*MstManager) Clear ¶ added in v1.5.0
func (m *MstManager) Clear()
func (*MstManager) Del ¶ added in v1.5.0
func (m *MstManager) Del(ident MeasurementIdent)
func (*MstManager) DelAll ¶ added in v1.5.0
func (m *MstManager) DelAll(db, rp string)
func (*MstManager) Exists ¶ added in v1.5.0
func (m *MstManager) Exists(ident MeasurementIdent) bool
func (*MstManager) Get ¶ added in v1.5.0
func (m *MstManager) Get(db, rp, name string) (*Measurement, bool)
func (*MstManager) GetByIdent ¶ added in v1.5.0
func (m *MstManager) GetByIdent(ident MeasurementIdent) (*Measurement, bool)
type OffsetKeySorter ¶ added in v1.5.0
type OffsetKeySorter struct {
KeySorter
Times []int64
Offsets []int64
// contains filtered or unexported fields
}
func (*OffsetKeySorter) Append ¶ added in v1.5.0
func (oks *OffsetKeySorter) Append(other *OffsetKeySorter)
func (*OffsetKeySorter) IteratorFragment ¶ added in v1.5.0
func (oks *OffsetKeySorter) IteratorFragment(fn func(int, int) bool)
func (*OffsetKeySorter) Len ¶ added in v1.5.0
func (oks *OffsetKeySorter) Len() int
func (*OffsetKeySorter) Less ¶ added in v1.5.0
func (oks *OffsetKeySorter) Less(i, j int) bool
func (*OffsetKeySorter) Swap ¶ added in v1.5.0
func (oks *OffsetKeySorter) Swap(i, j int)
type OffsetsMap ¶ added in v1.5.0
type OffsetsMap struct {
// contains filtered or unexported fields
}
func NewOffsetsMap ¶ added in v1.5.0
func NewOffsetsMap() *OffsetsMap
func (*OffsetsMap) AppendToIfExists ¶ added in v1.5.0
func (o *OffsetsMap) AppendToIfExists(key string, dst []int64) []int64
type PKInfo ¶
type PKInfo struct {
// contains filtered or unexported fields
}
func (*PKInfo) BuildColumnMap ¶ added in v1.5.0
func (p *PKInfo) BuildColumnMap()
func (*PKInfo) GetClusterIndex ¶ added in v1.5.0
func (p *PKInfo) GetClusterIndex() ClusterIndex
func (*PKInfo) GetColumnMap ¶ added in v1.5.0
func (*PKInfo) GetMark ¶
func (p *PKInfo) GetMark() fragment.IndexFragment
func (*PKInfo) GetTCLocation ¶ added in v1.1.1
func (*PKInfo) IsClusterIndex ¶ added in v1.5.0
func (*PKInfo) SetClusterIndex ¶ added in v1.5.0
func (p *PKInfo) SetClusterIndex(ci ClusterIndex)
type PkMetaBlock ¶ added in v1.3.0
func UnmarshalPkMetaBlock ¶ added in v1.3.0
func UnmarshalPkMetaBlock(src []byte) (*PkMetaBlock, error)
type PrimaryKeyFetcher ¶ added in v1.5.0
type PrimaryKeyFetcher struct {
// contains filtered or unexported fields
}
type PrimaryKeyReader ¶
type PrimaryKeyReader struct {
// contains filtered or unexported fields
}
func NewPrimaryKeyReader ¶
func NewPrimaryKeyReader(name string, lockPath *string) (*PrimaryKeyReader, error)
func (*PrimaryKeyReader) Close ¶
func (r *PrimaryKeyReader) Close() error
func (*PrimaryKeyReader) FileSize ¶
func (r *PrimaryKeyReader) FileSize() int64
func (*PrimaryKeyReader) Open ¶
func (r *PrimaryKeyReader) Open() error
func (*PrimaryKeyReader) ReadData ¶
func (r *PrimaryKeyReader) ReadData() (*record.Record, int8, error)
func (*PrimaryKeyReader) Version ¶
func (r *PrimaryKeyReader) Version() uint32
type SkipIndexInfo ¶ added in v1.5.0
type SkipIndexInfo struct {
// contains filtered or unexported fields
}
func NewSkipIndexInfo ¶ added in v1.5.0
func NewSkipIndexInfo(name string) *SkipIndexInfo
func (*SkipIndexInfo) MustRemove ¶ added in v1.5.0
func (si *SkipIndexInfo) MustRemove(lock fileops.FileLockOption)
func (*SkipIndexInfo) Name ¶ added in v1.5.0
func (si *SkipIndexInfo) Name() string
func (*SkipIndexInfo) Rename ¶ added in v1.5.0
func (si *SkipIndexInfo) Rename(to string, lock fileops.FileLockOption) error
type UniquePicker ¶ added in v1.5.0
type UniquePicker struct {
LinePicker
// contains filtered or unexported fields
}
func (*UniquePicker) IteratorSegment ¶ added in v1.5.0
func (p *UniquePicker) IteratorSegment(maxRowsPreSeg int, fn func(start, end int) bool)
func (*UniquePicker) MarkDuplicates ¶ added in v1.5.0
func (p *UniquePicker) MarkDuplicates()
Click to show internal directories.
Click to hide internal directories.