tsi

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 50 Imported by: 0

Documentation

Overview

nolint

Index

Constants

View Source
const (
	SeriesKeyToTSIDCacheName  = "seriesKey_tsid"
	TSIDToSeriesKeyCacheName  = "tsid_seriesKey"
	TSIDToFieldCacheName      = "tsid_field"
	TagKeyToTagValueCacheName = "tagKey_tagValue"
)
View Source
const (
	FieldIndexDirName = "field"
)
View Source
const (

	//maxTSIDsPerRow        = 64
	MergeSetDirName = "mergeset"
)
View Source
const (
	TextDirectory = "text"
)

Variables

View Source
var DefaultTR = TimeRange{Min: 0, Max: math.MaxInt64 - 1}
View Source
var ErrAllFields = errors.New("error all fields")
View Source
var ErrFieldExpr = errors.New("field expr")
View Source
var ErrTextExpr = errors.New("no text expr")
View Source
var IndexKeyPool sync.Pool
View Source
var IndexTagColsPool sync.Pool
View Source
var WriteBufferPool sync.Pool

Functions

func FieldBuild added in v1.0.0

func FieldBuild(relation *IndexRelation) error

func FieldCacheClear added in v1.2.0

func FieldCacheClear(index interface{}) error

func FieldClose added in v1.0.0

func FieldClose(index interface{}) error

func FieldDelete added in v1.0.0

func FieldDelete(index interface{}, primaryIndex PrimaryIndex, name []byte, condition influxql.Expr, tr TimeRange) error

func FieldFlush added in v1.0.1

func FieldFlush(index interface{})

func FieldInsert added in v1.0.0

func FieldInsert(index interface{}, primaryIndex PrimaryIndex, name []byte, row interface{}) (uint64, error)

func FieldOpen added in v1.0.0

func FieldOpen(index interface{}) error

func FieldScan added in v1.0.0

func FieldScan(index interface{}, primaryIndex PrimaryIndex, span *tracing.Span, name []byte, opt *query.ProcessorOptions, callBack func(num int64) error, groups interface{}) (interface{}, int64, error)

func GenerateUUID

func GenerateUUID() uint64

func GetIndexKeyCache added in v1.2.0

func GetIndexKeyCache() *keyCache

func GetWriteBuffer added in v1.2.0

func GetWriteBuffer() *bytes.Buffer

func LoadCache

func LoadCache(name, cachePath string, sizeBytes int) *workingsetcache.Cache

func MakeGroupTagsKey

func MakeGroupTagsKey(dims []string, tags influx.PointTags, dst []byte, dimPos map[string]int) []byte

func MergeSetBuild

func MergeSetBuild(relation *IndexRelation) error

indexRelation contains MergeSetIndex meta store IndexBuild

func MergeSetCacheClear added in v1.2.0

func MergeSetCacheClear(index interface{}) error

func MergeSetClose

func MergeSetClose(index interface{}) error

func MergeSetDelete

func MergeSetDelete(index interface{}, primaryIndex PrimaryIndex, name []byte, condition influxql.Expr, tr TimeRange) error

func MergeSetFlush added in v1.0.1

func MergeSetFlush(index interface{})

func MergeSetInsert

func MergeSetInsert(index interface{}, primaryIndex PrimaryIndex, name []byte, row interface{}) (uint64, error)

func MergeSetOpen

func MergeSetOpen(index interface{}) error

func MergeSetScan

func MergeSetScan(index interface{}, primaryIndex PrimaryIndex, span *tracing.Span, name []byte, opt *query.ProcessorOptions, callBack func(num int64) error, _ interface{}) (interface{}, int64, error)

upper function call should analyze result

func NewFieldIndex added in v1.0.0

func NewFieldIndex(opts *Options) (*fieldIndex, error)

func NewTagKeyReflection

func NewTagKeyReflection(src, curr []string) *tagKeyReflection

func NewTagSetPool

func NewTagSetPool() *tagSetInfoPool

func PutIndexKeyCache added in v1.2.0

func PutIndexKeyCache(key *keyCache)

func PutIndexTagCols added in v1.1.0

func PutIndexTagCols(tagCols *IndexTagCols)

func PutWriteBuffer added in v1.2.0

func PutWriteBuffer(buf *bytes.Buffer)

func TextBuild

func TextBuild(relation *IndexRelation) error

func TextCacheClear added in v1.2.0

func TextCacheClear(index interface{}) error

func TextClose

func TextClose(index interface{}) error

func TextDelete

func TextDelete(index interface{}, primaryIndex PrimaryIndex, name []byte, condition influxql.Expr, tr TimeRange) error

func TextFlush added in v1.1.0

func TextFlush(index interface{})

func TextInsert

func TextInsert(index interface{}, primaryIndex PrimaryIndex, name []byte, row interface{}) (uint64, error)

func TextOpen

func TextOpen(index interface{}) error

func TextScan

func TextScan(index interface{}, primaryIndex PrimaryIndex, span *tracing.Span, name []byte, opt *query.ProcessorOptions, callBack func(num int64) error, groups interface{}) (interface{}, int64, error)

upper function call should analyze result

Types

type CsIndexImpl added in v1.1.0

type CsIndexImpl struct {
	// contains filtered or unexported fields
}

func (*CsIndexImpl) CreateIndexIfNotExistsByCol added in v1.2.0

func (csIdx *CsIndexImpl) CreateIndexIfNotExistsByCol(idx *MergeSetIndex, col *TagCol) error

func (*CsIndexImpl) CreateIndexIfNotExistsByRow added in v1.1.0

func (csIdx *CsIndexImpl) CreateIndexIfNotExistsByRow(idx *MergeSetIndex, row *influx.Row) error

func (*CsIndexImpl) SearchTagValues added in v1.1.0

func (csIdx *CsIndexImpl) SearchTagValues(name []byte, tagKeys [][]byte, condition influxql.Expr, is *indexSearch) ([][]string, error)

type DumpInfo

type DumpInfo struct {
	ShowTagKeys        bool
	ShowTagValues      bool
	ShowTagValueSeries bool
	MeasurementFilter  *regexp.Regexp
	TagKeyFilter       *regexp.Regexp
	TagValueFilter     *regexp.Regexp
}

type GroupSeries

type GroupSeries []*TagSetInfo

func (GroupSeries) Len

func (gs GroupSeries) Len() int

func (GroupSeries) Less

func (gs GroupSeries) Less(i, j int) bool

func (GroupSeries) Reverse

func (gs GroupSeries) Reverse()

func (GroupSeries) SeriesCnt

func (gs GroupSeries) SeriesCnt() int

func (GroupSeries) Swap

func (gs GroupSeries) Swap(i, j int)

type Index

type Index interface {
	CreateIndexIfNotExists(mmRows *dictpool.Dict) error
	GetSeriesIdBySeriesKey(key, name []byte) (uint64, error)
	SearchSeries(series [][]byte, name []byte, condition influxql.Expr, tr TimeRange) ([][]byte, error)
	SearchSeriesWithOpts(span *tracing.Span, name []byte, opt *query.ProcessorOptions, callBack func(num int64) error, _ interface{}) (GroupSeries, int64, error)
	SeriesCardinality(name []byte, condition influxql.Expr, tr TimeRange) (uint64, error)
	SearchSeriesKeys(series [][]byte, name []byte, condition influxql.Expr) ([][]byte, error)
	SearchTagValues(name []byte, tagKeys [][]byte, condition influxql.Expr) ([][]string, error)
	SearchTagValuesCardinality(name, tagKey []byte) (uint64, error)

	// search
	GetPrimaryKeys(name []byte, opt *query.ProcessorOptions) ([]uint64, error)
	// delete
	GetDeletePrimaryKeys(name []byte, condition influxql.Expr, tr TimeRange) ([]uint64, error)

	SetIndexBuilder(builder *IndexBuilder)

	DeleteTSIDs(name []byte, condition influxql.Expr, tr TimeRange) error

	Path() string

	DebugFlush()
	Open() error
	Close() error
}

func NewIndex

func NewIndex(opts *Options) (Index, error)

type IndexAmRoutine

type IndexAmRoutine struct {
	// contains filtered or unexported fields
}

func FieldIndexHandler added in v1.0.0

func FieldIndexHandler(opt *Options, primaryIndex PrimaryIndex) (*IndexAmRoutine, error)

func MergeSetIndexHandler

func MergeSetIndexHandler(opt *Options, primaryIndex PrimaryIndex) (*IndexAmRoutine, error)

func TextIndexHandler

func TextIndexHandler(opt *Options, primaryIndex PrimaryIndex) (*IndexAmRoutine, error)

type IndexBuilder

type IndexBuilder struct {
	Relations []*IndexRelation // <oid, indexRelation>

	EnableTagArray bool
	// contains filtered or unexported fields
}

IndexBuilder is a collection of all indexes

func NewIndexBuilder

func NewIndexBuilder(opt *Options) *IndexBuilder

func (*IndexBuilder) ClearCache added in v1.2.0

func (iBuilder *IndexBuilder) ClearCache() error

func (*IndexBuilder) Close

func (iBuilder *IndexBuilder) Close() error

func (*IndexBuilder) CreateIndexIfNotExists

func (iBuilder *IndexBuilder) CreateIndexIfNotExists(mmRows *dictpool.Dict, needSecondaryIndex bool) error

func (*IndexBuilder) CreateIndexIfNotExistsByCol added in v1.2.0

func (iBuilder *IndexBuilder) CreateIndexIfNotExistsByCol(rec *record.Record, tagIndex []int, mst string) error

func (*IndexBuilder) CreateSecondaryIndexIfNotExist added in v1.0.1

func (iBuilder *IndexBuilder) CreateSecondaryIndexIfNotExist(mmRows *dictpool.Dict) error

func (*IndexBuilder) Delete

func (iBuilder *IndexBuilder) Delete(name []byte, condition influxql.Expr, tr TimeRange) error

func (*IndexBuilder) Expired

func (iBuilder *IndexBuilder) Expired() bool

func (*IndexBuilder) ExpiredCache added in v1.2.0

func (iBuilder *IndexBuilder) ExpiredCache() bool

func (*IndexBuilder) Flush

func (iBuilder *IndexBuilder) Flush()

func (*IndexBuilder) GenerateUUID added in v1.0.0

func (iBuilder *IndexBuilder) GenerateUUID() uint64

func (*IndexBuilder) GetDuration

func (iBuilder *IndexBuilder) GetDuration() time.Duration

func (*IndexBuilder) GetEndTime

func (iBuilder *IndexBuilder) GetEndTime() time.Time

func (*IndexBuilder) GetIndexID

func (iBuilder *IndexBuilder) GetIndexID() uint64

func (*IndexBuilder) GetPrimaryIndex

func (iBuilder *IndexBuilder) GetPrimaryIndex() PrimaryIndex

func (*IndexBuilder) Ident

func (iBuilder *IndexBuilder) Ident() *meta.IndexIdentifier

func (*IndexBuilder) Open

func (iBuilder *IndexBuilder) Open() error

func (*IndexBuilder) Overlaps added in v1.1.0

func (iBuilder *IndexBuilder) Overlaps(tr influxql.TimeRange) bool

func (*IndexBuilder) Path

func (iBuilder *IndexBuilder) Path() string

func (*IndexBuilder) RPName

func (iBuilder *IndexBuilder) RPName() string

func (*IndexBuilder) Scan

func (iBuilder *IndexBuilder) Scan(span *tracing.Span, name []byte, opt *query.ProcessorOptions, callBack func(num int64) error) (interface{}, int64, error)

func (*IndexBuilder) SeriesLimited added in v1.1.0

func (iBuilder *IndexBuilder) SeriesLimited() error

func (*IndexBuilder) SetDuration

func (iBuilder *IndexBuilder) SetDuration(duration time.Duration)

func (*IndexBuilder) SetSeriesLimiter added in v1.1.0

func (iBuilder *IndexBuilder) SetSeriesLimiter(limiter func() error)

type IndexCache

type IndexCache struct {
	// series key -> TSID.
	SeriesKeyToTSIDCache *workingsetcache.Cache

	// TSID -> series key
	TSIDToSeriesKeyCache *workingsetcache.Cache

	// Cache for TagKeys -> TagValues
	TagKeyValueCache *workingsetcache.Cache

	// Cache for tagFilter->cost
	TagFilterCostCache *workingsetcache.Cache
	// contains filtered or unexported fields
}

func (*IndexCache) GetTSIDFromTSIDCache

func (ic *IndexCache) GetTSIDFromTSIDCache(id *uint64, key []byte) bool

func (*IndexCache) PutTSIDToTSIDCache

func (ic *IndexCache) PutTSIDToTSIDCache(id *uint64, key []byte)

func (*IndexCache) PutTagValuesToTagKeysCache added in v1.1.0

func (ic *IndexCache) PutTagValuesToTagKeysCache(value []byte, key []byte)

func (*IndexCache) UpdateMetrics

func (ic *IndexCache) UpdateMetrics()

type IndexMetrics

type IndexMetrics struct {
	TSIDCacheSize      uint64
	TSIDCacheSizeBytes uint64
	TSIDCacheRequests  uint64
	TSIDCacheMisses    uint64

	SKeyCacheSize      uint64
	SKeyCacheSizeBytes uint64
	SKeyCacheRequests  uint64
	SKeyCacheMisses    uint64

	TagCacheSize      uint64
	TagCacheSizeBytes uint64
	TagCacheRequests  uint64
	TagCacheMisses    uint64
}

type IndexRecord added in v1.1.0

type IndexRecord struct {
	TagCol *TagCol
	Err    error
}

type IndexRelation

type IndexRelation struct {
	// contains filtered or unexported fields
}

IndexRelation define functions of a specific index

func NewIndexRelation

func NewIndexRelation(opt *Options, primaryIndex PrimaryIndex, iBuilder *IndexBuilder) (*IndexRelation, error)

func (*IndexRelation) IndexBuild

func (relation *IndexRelation) IndexBuild(name []byte, indexMap map[string]int) error

func (*IndexRelation) IndexCacheClear added in v1.2.0

func (relation *IndexRelation) IndexCacheClear() error

func (*IndexRelation) IndexClose

func (relation *IndexRelation) IndexClose() error

func (*IndexRelation) IndexDelete

func (relation *IndexRelation) IndexDelete(name []byte, condition influxql.Expr, tr TimeRange) error

func (*IndexRelation) IndexFlush added in v1.0.1

func (relation *IndexRelation) IndexFlush()

func (*IndexRelation) IndexInsert

func (relation *IndexRelation) IndexInsert(name []byte, point interface{}) error

func (*IndexRelation) IndexOpen

func (relation *IndexRelation) IndexOpen() error

func (*IndexRelation) IndexRelation

func (relation *IndexRelation) IndexRelation(oid1 int, oid2 int, result1 interface{}, result2 interface{}) (interface{}, error)

func (*IndexRelation) IndexScan

func (relation *IndexRelation) IndexScan(span *tracing.Span, name []byte, opt *query.ProcessorOptions, groups interface{}, callBack func(num int64) error) (interface{}, int64, error)

type IndexTagCols added in v1.1.0

type IndexTagCols []TagCol

func GetIndexTagCols added in v1.1.0

func GetIndexTagCols(num int) *IndexTagCols

type MergeSetIndex

type MergeSetIndex struct {
	StorageIndex StorageIndex
	// contains filtered or unexported fields
}

func NewMergeSetIndex

func NewMergeSetIndex(opts *Options) (*MergeSetIndex, error)

func (*MergeSetIndex) ClearCache added in v1.2.0

func (idx *MergeSetIndex) ClearCache() error

func (*MergeSetIndex) Close

func (idx *MergeSetIndex) Close() error

func (*MergeSetIndex) CreateIndexIfNotExists

func (idx *MergeSetIndex) CreateIndexIfNotExists(mmRows *dictpool.Dict) error

func (*MergeSetIndex) CreateIndexIfNotExistsByRow

func (idx *MergeSetIndex) CreateIndexIfNotExistsByRow(row *influx.Row) (uint64, error)

for row with no tags, eg: insert foo foo.bar.baz=1 use old path

func (*MergeSetIndex) DebugFlush

func (idx *MergeSetIndex) DebugFlush()

func (*MergeSetIndex) DeleteTSIDs

func (idx *MergeSetIndex) DeleteTSIDs(name []byte, condition influxql.Expr, tr TimeRange) error

func (*MergeSetIndex) DumpMeasurements

func (idx *MergeSetIndex) DumpMeasurements(tw *tabwriter.Writer, dumpInfo *DumpInfo) error

func (*MergeSetIndex) DumpSeries

func (idx *MergeSetIndex) DumpSeries(tw *tabwriter.Writer) error

func (*MergeSetIndex) GetDeletePrimaryKeys

func (idx *MergeSetIndex) GetDeletePrimaryKeys(name []byte, condition influxql.Expr, tr TimeRange) ([]uint64, error)

func (*MergeSetIndex) GetPrimaryKeys

func (idx *MergeSetIndex) GetPrimaryKeys(name []byte, opt *query.ProcessorOptions) ([]uint64, error)

func (*MergeSetIndex) GetSeriesIdBySeriesKey

func (idx *MergeSetIndex) GetSeriesIdBySeriesKey(seriesKey []byte, name []byte) (uint64, error)

func (*MergeSetIndex) IsTagKeyExist added in v1.1.0

func (idx *MergeSetIndex) IsTagKeyExist(row influx.Row) (bool, error)

func (*MergeSetIndex) IsTagKeyExistByArrowFlight added in v1.1.0

func (idx *MergeSetIndex) IsTagKeyExistByArrowFlight(col *TagCol) (bool, error)

func (*MergeSetIndex) Open

func (idx *MergeSetIndex) Open() error

func (*MergeSetIndex) Path

func (idx *MergeSetIndex) Path() string

func (*MergeSetIndex) SearchSeries

func (idx *MergeSetIndex) SearchSeries(series [][]byte, name []byte, condition influxql.Expr, tr TimeRange) ([][]byte, error)

func (*MergeSetIndex) SearchSeriesIterator added in v1.0.0

func (idx *MergeSetIndex) SearchSeriesIterator(span *tracing.Span, name []byte, opt *query.ProcessorOptions) (index.SeriesIDIterator, error)

func (*MergeSetIndex) SearchSeriesKeys

func (idx *MergeSetIndex) SearchSeriesKeys(series [][]byte, name []byte, condition influxql.Expr) ([][]byte, error)

func (*MergeSetIndex) SearchSeriesWithOpts

func (idx *MergeSetIndex) SearchSeriesWithOpts(span *tracing.Span, name []byte, opt *query.ProcessorOptions, callBack func(num int64) error, _ interface{}) (GroupSeries, int64, error)

func (*MergeSetIndex) SearchTagValues

func (idx *MergeSetIndex) SearchTagValues(name []byte, tagKeys [][]byte, condition influxql.Expr) ([][]string, error)

func (*MergeSetIndex) SearchTagValuesCardinality

func (idx *MergeSetIndex) SearchTagValuesCardinality(name, tagKey []byte) (uint64, error)

func (*MergeSetIndex) SeriesCardinality

func (idx *MergeSetIndex) SeriesCardinality(name []byte, condition influxql.Expr, tr TimeRange) (uint64, error)

func (*MergeSetIndex) SetIndexBuilder

func (idx *MergeSetIndex) SetIndexBuilder(builder *IndexBuilder)

func (*MergeSetIndex) WriteRow added in v0.2.0

func (idx *MergeSetIndex) WriteRow(row *indexRow)

func (*MergeSetIndex) WriteTagCols added in v1.1.0

func (idx *MergeSetIndex) WriteTagCols(tagCol *TagCol)

type Options

type Options struct {
	// contains filtered or unexported fields
}

func (*Options) CacheDuration added in v1.2.0

func (opts *Options) CacheDuration(cacheDuration time.Duration) *Options

func (*Options) Duration

func (opts *Options) Duration(duration time.Duration) *Options

func (*Options) EndTime

func (opts *Options) EndTime(endTime time.Time) *Options

func (*Options) EngineType added in v1.1.0

func (opts *Options) EngineType(engineType config.EngineType) *Options

func (*Options) Ident

func (opts *Options) Ident(ident *meta.IndexIdentifier) *Options

func (*Options) IndexType

func (opts *Options) IndexType(indexType index.IndexType) *Options

func (*Options) Lock added in v1.0.0

func (opts *Options) Lock(lock *string) *Options

func (*Options) LogicalClock added in v1.0.0

func (opts *Options) LogicalClock(clock uint64) *Options

func (*Options) OpId added in v1.0.0

func (opts *Options) OpId(opId uint64) *Options

func (*Options) Path

func (opts *Options) Path(path string) *Options

func (*Options) SequenceId added in v1.0.0

func (opts *Options) SequenceId(id *uint64) *Options

func (*Options) StartTime added in v1.1.0

func (opts *Options) StartTime(startTime time.Time) *Options

type PrimaryIndex

type PrimaryIndex interface {
	CreateIndexIfNotExists(mmRows *dictpool.Dict) error
	GetPrimaryKeys(name []byte, opt *query.ProcessorOptions) ([]uint64, error)
	GetDeletePrimaryKeys(name []byte, condition influxql.Expr, tr TimeRange) ([]uint64, error)
	SearchSeriesWithOpts(span *tracing.Span, name []byte, opt *query.ProcessorOptions, callBack func(num int64) error, _ interface{}) (GroupSeries, int64, error)
	Path() string
}

type SortGroupSeries added in v1.0.0

type SortGroupSeries struct {
	// contains filtered or unexported fields
}

func NewSortGroupSeries added in v1.0.0

func NewSortGroupSeries(groupSeries []*TagSetInfo, ascending bool) *SortGroupSeries

func (SortGroupSeries) Len added in v1.0.0

func (s SortGroupSeries) Len() int

func (SortGroupSeries) Less added in v1.0.0

func (s SortGroupSeries) Less(i, j int) bool

func (SortGroupSeries) Swap added in v1.0.0

func (s SortGroupSeries) Swap(i, j int)

type StorageIndex added in v1.1.0

type StorageIndex interface {
	SearchTagValues(name []byte, tagKeys [][]byte, condition influxql.Expr, is *indexSearch) ([][]string, error)
	// contains filtered or unexported methods
}

type Tag

type Tag struct {
	Key   []byte
	Value []byte
}

Tag represents a (key, value) tag for metric.

func (*Tag) Equal

func (tag *Tag) Equal(t *Tag) bool

Equal returns true if tag equals t

func (*Tag) Marshal

func (tag *Tag) Marshal(dst []byte) []byte

Marshal appends marshaled tag to dst and returns the result.

func (*Tag) Reset

func (tag *Tag) Reset()

Reset resets the tag.

func (*Tag) Unmarshal

func (tag *Tag) Unmarshal(src []byte) ([]byte, error)

Unmarshal unmarshals tag from src and returns the remaining data from src.

type TagCol added in v1.1.0

type TagCol struct {
	Wg       *sync.WaitGroup
	Val      []byte
	Mst, Key []byte
	Err      error
}

type TagFilters

type TagFilters struct {
	// contains filtered or unexported fields
}

func (*TagFilters) Reset

func (tfs *TagFilters) Reset()

Reset resets the tf

type TagSetInfo

type TagSetInfo struct {
	IDs        []uint64
	Filters    []influxql.Expr
	SeriesKeys [][]byte           // encoded series key
	TagsVec    []influx.PointTags // tags of all series

	RowFilters *clv.RowFilters // only uesed in full-text index for row filtering
	// contains filtered or unexported fields
}

func NewSingleTagSetInfo added in v1.0.0

func NewSingleTagSetInfo() *TagSetInfo

func NewTagSetInfo

func NewTagSetInfo() *TagSetInfo

func (*TagSetInfo) Append

func (t *TagSetInfo) Append(id uint64, seriesKey []byte, filter influxql.Expr, tags influx.PointTags, rowFilter []clv.RowFilter)

func (*TagSetInfo) GetRowFilter added in v1.1.0

func (t *TagSetInfo) GetRowFilter(idx int) *[]clv.RowFilter

func (*TagSetInfo) Len

func (t *TagSetInfo) Len() int

func (*TagSetInfo) Less

func (t *TagSetInfo) Less(i, j int) bool

func (*TagSetInfo) Ref

func (t *TagSetInfo) Ref()

func (*TagSetInfo) Sort added in v1.0.0

func (t *TagSetInfo) Sort(schema *executor.QuerySchema)

func (*TagSetInfo) String

func (t *TagSetInfo) String() string

func (*TagSetInfo) Swap

func (t *TagSetInfo) Swap(i, j int)

func (*TagSetInfo) Unref

func (t *TagSetInfo) Unref()

type TagSetsPool added in v1.0.0

type TagSetsPool struct {
	// contains filtered or unexported fields
}

func (*TagSetsPool) Get added in v1.0.0

func (pool *TagSetsPool) Get() *tagSets

func (*TagSetsPool) Put added in v1.0.0

func (pool *TagSetsPool) Put(tags *tagSets)

type TextIndex

type TextIndex struct {
	// contains filtered or unexported fields
}

func NewTextIndex

func NewTextIndex(opts *Options) (*TextIndex, error)

func (*TextIndex) Close

func (idx *TextIndex) Close() error

func (*TextIndex) CreateIndexIfNotExists

func (idx *TextIndex) CreateIndexIfNotExists(primaryIndex PrimaryIndex, row *influx.Row) (uint64, error)

func (*TextIndex) Delete

func (idx *TextIndex) Delete(primaryIndex PrimaryIndex, name []byte, condition influxql.Expr, tr TimeRange) error

func (*TextIndex) Flush added in v1.1.0

func (idx *TextIndex) Flush()

func (*TextIndex) NewTokenIndex added in v1.1.0

func (idx *TextIndex) NewTokenIndex(idxPath, measurement, field string) error

func (*TextIndex) Open

func (idx *TextIndex) Open() error

func (*TextIndex) Search

func (idx *TextIndex) Search(primaryIndex PrimaryIndex, span *tracing.Span, name []byte, opt *query.ProcessorOptions, groups interface{}) (GroupSeries, error)

func (*TextIndex) SearchByTokenIndex added in v1.1.0

func (idx *TextIndex) SearchByTokenIndex(name string, sids []uint64, n *influxql.BinaryExpr) (*clv.InvertIndex, error)

func (*TextIndex) SearchTextIndex added in v1.1.0

func (idx *TextIndex) SearchTextIndex(name []byte, srcSet *TagSetInfo) (*TagSetInfo, error)

The Filter for each ID of the srcSet is the same.

func (*TextIndex) SearchTextIndexByExpr added in v1.1.0

func (idx *TextIndex) SearchTextIndexByExpr(name string, sids []uint64, expr influxql.Expr) (*clv.InvertIndex, error)

type TimeRange

type TimeRange util.TimeRange

TimeRange is time range.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL