Versions in this module Expand all Collapse all v1 v1.3.2 Aug 4, 2017 Changes in this version type Index + func (i *Index) MeasurementTagKeyValuesByExpr(name []byte, keys []string, expr influxql.Expr, keysSorted bool) ([][]string, error) v1.3.1 Jul 20, 2017 v1.3.0 Jun 21, 2017 Changes in this version + const CompactingExt + const DefaultMaxLogFileSize + const FileSignature + const IndexFileExt + const IndexFileTrailerSize + const IndexFileVersion + const IndexFileVersionSize + const IndexName + const LoadFactor + const LogEntryMeasurementTombstoneFlag + const LogEntrySeriesTombstoneFlag + const LogEntryTagKeyTombstoneFlag + const LogEntryTagValueTombstoneFlag + const LogFileExt + const ManifestFileName + const MaxIndexFileSize + const MaxIndexMergeCount + const MaxSeriesBlockHashSize + const MeasurementBlockOffsetSize + const MeasurementBlockSizeSize + const MeasurementBlockVersion + const MeasurementFillSize + const MeasurementNSize + const MeasurementOffsetSize + const MeasurementTombstoneFlag + const MeasurementTrailerSize + const SeriesBlockOffsetSize + const SeriesBlockSizeSize + const SeriesBlockTrailerSize + const SeriesCountSize + const SeriesHashIndexFlag + const SeriesIDSize + const SeriesTombstoneFlag + const TagBlockTrailerSize + const TagBlockVersion + const TagKeyNSize + const TagKeyOffsetSize + const TagKeyTombstoneFlag + const TagValueNSize + const TagValueOffsetSize + const TagValueTombstoneFlag + var DefaultCompactionLevels = []CompactionLevel + var ErrInvalidIndexFile = errors.New("invalid index file") + var ErrLogEntryChecksumMismatch = errors.New("log entry checksum mismatch") + var ErrMeasurementBlockSizeMismatch = errors.New("measurement block size mismatch") + var ErrSeriesOverflow = errors.New("series overflow") + var ErrTagBlockSizeMismatch = errors.New("tag block size mismatch") + var ErrUnsupportedIndexFileVersion = errors.New("unsupported index file version") + var ErrUnsupportedMeasurementBlockVersion = errors.New("unsupported measurement block version") + var ErrUnsupportedTagBlockVersion = errors.New("unsupported tag block version") + func AppendSeriesElem(dst []byte, flag byte, name []byte, tags models.Tags) []byte + func AppendSeriesKey(dst []byte, name []byte, tags models.Tags) []byte + func CompareSeriesElem(a, b SeriesElem) int + func CompareSeriesKeys(a, b []byte) int + func FormatIndexFileName(id, level int) string + func FormatLogFileName(id int) string + func ParseFilename(name string) (level, id int) + func ReadSeriesKey(data []byte) []byte + func SeriesElemKey(e SeriesElem) []byte + func WriteManifestFile(path string, m *Manifest) error + type CompactionLevel struct + K uint64 + M uint64 + type File interface + Close func() error + Filter func() *bloom.Filter + HasSeries func(name []byte, tags models.Tags, buf []byte) (exists, tombstoned bool) + ID func() int + Level func() int + Measurement func(name []byte) MeasurementElem + MeasurementIterator func() MeasurementIterator + MeasurementSeriesIterator func(name []byte) SeriesIterator + MergeMeasurementsSketches func(s, t estimator.Sketch) error + MergeSeriesSketches func(s, t estimator.Sketch) error + Path func() string + Release func() + Retain func() + Series func(name []byte, tags models.Tags) SeriesElem + SeriesIterator func() SeriesIterator + SeriesN func() uint64 + TagKey func(name, key []byte) TagKeyElem + TagKeyIterator func(name []byte) TagKeyIterator + TagKeySeriesIterator func(name, key []byte) SeriesIterator + TagValue func(name, key, value []byte) TagValueElem + TagValueIterator func(name, key []byte) TagValueIterator + TagValueSeriesIterator func(name, key, value []byte) SeriesIterator + type FileSet struct + func NewFileSet(levels []CompactionLevel, files []File) (*FileSet, error) + func (fs *FileSet) Files() []File + func (fs *FileSet) FilterNamesTags(names [][]byte, tagsSlice []models.Tags) ([][]byte, []models.Tags) + func (fs *FileSet) HasSeries(name []byte, tags models.Tags, buf []byte) bool + func (fs *FileSet) HasTagKey(name, key []byte) bool + func (fs *FileSet) HasTagValue(name, key, value []byte) bool + func (fs *FileSet) IndexFiles() []*IndexFile + func (fs *FileSet) LastContiguousIndexFilesByLevel(level int) []*IndexFile + func (fs *FileSet) LogFiles() []*LogFile + func (fs *FileSet) MatchTagValueSeriesIterator(name, key []byte, value *regexp.Regexp, matches bool) SeriesIterator + func (fs *FileSet) MaxID() int + func (fs *FileSet) Measurement(name []byte) MeasurementElem + func (fs *FileSet) MeasurementIterator() MeasurementIterator + func (fs *FileSet) MeasurementNamesByExpr(expr influxql.Expr) ([][]byte, error) + func (fs *FileSet) MeasurementSeriesByExprIterator(name []byte, expr influxql.Expr, fieldset *tsdb.MeasurementFieldSet) (SeriesIterator, error) + func (fs *FileSet) MeasurementSeriesIterator(name []byte) SeriesIterator + func (fs *FileSet) MeasurementSeriesKeysByExpr(name []byte, expr influxql.Expr, fieldset *tsdb.MeasurementFieldSet) ([][]byte, error) + func (fs *FileSet) MeasurementTagKeysByExpr(name []byte, expr influxql.Expr) (map[string]struct{}, error) + func (fs *FileSet) MeasurementsSketches() (estimator.Sketch, estimator.Sketch, error) + func (fs *FileSet) MustReplace(oldFiles []File, newFile File) *FileSet + func (fs *FileSet) Prepend(f File) (*FileSet, error) + func (fs *FileSet) Release() + func (fs *FileSet) Retain() + func (fs *FileSet) SeriesIterator() SeriesIterator + func (fs *FileSet) SeriesSketches() (estimator.Sketch, estimator.Sketch, error) + func (fs *FileSet) TagKeyIterator(name []byte) TagKeyIterator + func (fs *FileSet) TagKeySeriesIterator(name, key []byte) SeriesIterator + func (fs *FileSet) TagValueIterator(name, key []byte) TagValueIterator + func (fs *FileSet) TagValueSeriesIterator(name, key, value []byte) SeriesIterator + func (p FileSet) Close() error + type Files []File + func (a Files) IDs() []int + type Index struct + CompactionEnabled bool + CompactionMonitorInterval time.Duration + Database string + MaxLogFileSize int64 + Path string + ShardID uint64 + func NewIndex() *Index + func (i *Index) AssignShard(k string, shardID uint64) + func (i *Index) CheckLogFile() error + func (i *Index) Close() error + func (i *Index) Compact() + func (i *Index) CreateSeriesIfNotExists(key, name []byte, tags models.Tags) error + func (i *Index) CreateSeriesListIfNotExists(_, names [][]byte, tagsSlice []models.Tags) error + func (i *Index) DropMeasurement(name []byte) error + func (i *Index) DropSeries(key []byte) error + func (i *Index) FileN() int + func (i *Index) ForEachMeasurementName(fn func(name []byte) error) error + func (i *Index) ForEachMeasurementSeriesByExpr(name []byte, condition influxql.Expr, fn func(tags models.Tags) error) error + func (i *Index) ForEachMeasurementTagKey(name []byte, fn func(key []byte) error) error + func (i *Index) HasTagKey(name, key []byte) (bool, error) + func (i *Index) InitializeSeries(key, name []byte, tags models.Tags) error + func (i *Index) Manifest() *Manifest + func (i *Index) ManifestPath() string + func (i *Index) MeasurementExists(name []byte) (bool, error) + func (i *Index) MeasurementNamesByExpr(expr influxql.Expr) ([][]byte, error) + func (i *Index) MeasurementNamesByRegex(re *regexp.Regexp) ([][]byte, error) + func (i *Index) MeasurementSeriesKeysByExpr(name []byte, expr influxql.Expr) ([][]byte, error) + func (i *Index) MeasurementTagKeysByExpr(name []byte, expr influxql.Expr) (map[string]struct{}, error) + func (i *Index) MeasurementsSketches() (estimator.Sketch, estimator.Sketch, error) + func (i *Index) NextSequence() int + func (i *Index) Open() error + func (i *Index) RemoveShard(shardID uint64) + func (i *Index) RetainFileSet() *FileSet + func (i *Index) SeriesN() int64 + func (i *Index) SeriesPointIterator(opt influxql.IteratorOptions) (influxql.Iterator, error) + func (i *Index) SeriesSketches() (estimator.Sketch, estimator.Sketch, error) + func (i *Index) SetFieldName(measurement []byte, name string) + func (i *Index) SetFieldSet(fs *tsdb.MeasurementFieldSet) + func (i *Index) SnapshotTo(path string) error + func (i *Index) TagKeyCardinality(name, key []byte) int + func (i *Index) TagSets(name []byte, opt influxql.IteratorOptions) ([]*influxql.TagSet, error) + func (i *Index) Type() string + func (i *Index) UnassignShard(k string, shardID uint64) error + func (i *Index) WithLogger(logger zap.Logger) + type IndexFile struct + func NewIndexFile() *IndexFile + func (f *IndexFile) Close() error + func (f *IndexFile) Compacting() bool + func (f *IndexFile) Filter() *bloom.Filter + func (f *IndexFile) HasSeries(name []byte, tags models.Tags, buf []byte) (exists, tombstoned bool) + func (f *IndexFile) ID() int + func (f *IndexFile) Level() int + func (f *IndexFile) Measurement(name []byte) MeasurementElem + func (f *IndexFile) MeasurementIterator() MeasurementIterator + func (f *IndexFile) MeasurementN() (n uint64) + func (f *IndexFile) MeasurementSeriesIterator(name []byte) SeriesIterator + func (f *IndexFile) MergeMeasurementsSketches(s, t estimator.Sketch) error + func (f *IndexFile) MergeSeriesSketches(s, t estimator.Sketch) error + func (f *IndexFile) Open() error + func (f *IndexFile) Path() string + func (f *IndexFile) Release() + func (f *IndexFile) Retain() + func (f *IndexFile) Series(name []byte, tags models.Tags) SeriesElem + func (f *IndexFile) SeriesIterator() SeriesIterator + func (f *IndexFile) SeriesN() uint64 + func (f *IndexFile) SetPath(path string) + func (f *IndexFile) Size() int64 + func (f *IndexFile) TagKey(name, key []byte) TagKeyElem + func (f *IndexFile) TagKeyIterator(name []byte) TagKeyIterator + func (f *IndexFile) TagKeySeriesIterator(name, key []byte) SeriesIterator + func (f *IndexFile) TagValue(name, key, value []byte) TagValueElem + func (f *IndexFile) TagValueElem(name, key, value []byte) TagValueElem + func (f *IndexFile) TagValueIterator(name, key []byte) TagValueIterator + func (f *IndexFile) TagValueSeriesIterator(name, key, value []byte) SeriesIterator + func (f *IndexFile) UnmarshalBinary(data []byte) error + type IndexFileTrailer struct + MeasurementBlock struct{ ... } + SeriesBlock struct{ ... } + Version int + func ReadIndexFileTrailer(data []byte) (IndexFileTrailer, error) + func (t *IndexFileTrailer) WriteTo(w io.Writer) (n int64, err error) + type IndexFiles []*IndexFile + func (p *IndexFiles) MeasurementNames() [][]byte + func (p *IndexFiles) TagKeyIterator(name []byte) (TagKeyIterator, error) + func (p IndexFiles) CompactTo(w io.Writer, m, k uint64) (n int64, err error) + func (p IndexFiles) Files() []File + func (p IndexFiles) IDs() []int + func (p IndexFiles) MeasurementIterator() MeasurementIterator + func (p IndexFiles) MeasurementSeriesIterator(name []byte) SeriesIterator + func (p IndexFiles) Release() + func (p IndexFiles) Retain() + func (p IndexFiles) SeriesIterator() SeriesIterator + func (p IndexFiles) Stat() (*IndexFilesInfo, error) + func (p IndexFiles) TagValueSeriesIterator(name, key, value []byte) SeriesIterator + type IndexFilesInfo struct + MaxSize int64 + ModTime time.Time + Size int64 + type LogEntry struct + Checksum uint32 + Flag byte + Name []byte + Size int + Tags models.Tags + func (e *LogEntry) UnmarshalBinary(data []byte) error + type LogFile struct + func NewLogFile(path string) *LogFile + func (f *LogFile) AddSeries(name []byte, tags models.Tags) error + func (f *LogFile) AddSeriesList(names [][]byte, tagsSlice []models.Tags) error + func (f *LogFile) Close() error + func (f *LogFile) CompactTo(w io.Writer, m, k uint64) (n int64, err error) + func (f *LogFile) DeleteMeasurement(name []byte) error + func (f *LogFile) DeleteSeries(name []byte, tags models.Tags) error + func (f *LogFile) DeleteTagKey(name, key []byte) error + func (f *LogFile) DeleteTagValue(name, key, value []byte) error + func (f *LogFile) Filter() *bloom.Filter + func (f *LogFile) FilterNamesTags(names [][]byte, tagsSlice []models.Tags) ([][]byte, []models.Tags) + func (f *LogFile) Flush() error + func (f *LogFile) HasSeries(name []byte, tags models.Tags, buf []byte) (exists, tombstoned bool) + func (f *LogFile) ID() int + func (f *LogFile) Level() int + func (f *LogFile) Measurement(name []byte) MeasurementElem + func (f *LogFile) MeasurementIterator() MeasurementIterator + func (f *LogFile) MeasurementN() (n uint64) + func (f *LogFile) MeasurementNames() []string + func (f *LogFile) MeasurementSeriesIterator(name []byte) SeriesIterator + func (f *LogFile) MergeMeasurementsSketches(sketch, tsketch estimator.Sketch) error + func (f *LogFile) MergeSeriesSketches(sketch, tsketch estimator.Sketch) error + func (f *LogFile) Open() error + func (f *LogFile) Path() string + func (f *LogFile) Release() + func (f *LogFile) Retain() + func (f *LogFile) Series(name []byte, tags models.Tags) SeriesElem + func (f *LogFile) SeriesIterator() SeriesIterator + func (f *LogFile) SeriesN() (n uint64) + func (f *LogFile) SeriesWithBuffer(name []byte, tags models.Tags, buf []byte) SeriesElem + func (f *LogFile) SetPath(path string) + func (f *LogFile) Size() int64 + func (f *LogFile) Stat() (int64, time.Time) + func (f *LogFile) TagKey(name, key []byte) TagKeyElem + func (f *LogFile) TagKeyIterator(name []byte) TagKeyIterator + func (f *LogFile) TagKeyN() (n uint64) + func (f *LogFile) TagKeySeriesIterator(name, key []byte) SeriesIterator + func (f *LogFile) TagValue(name, key, value []byte) TagValueElem + func (f *LogFile) TagValueIterator(name, key []byte) TagValueIterator + func (f *LogFile) TagValueN() (n uint64) + func (f *LogFile) TagValueSeriesIterator(name, key, value []byte) SeriesIterator + type Manifest struct + Files []string + Levels []CompactionLevel + func NewManifest() *Manifest + func ReadManifestFile(path string) (*Manifest, error) + func (m *Manifest) HasFile(name string) bool + type MeasurementBlock struct + func (blk *MeasurementBlock) Elem(name []byte) (e MeasurementBlockElem, ok bool) + func (blk *MeasurementBlock) Iterator() MeasurementIterator + func (blk *MeasurementBlock) UnmarshalBinary(data []byte) error + func (blk *MeasurementBlock) Version() int + type MeasurementBlockElem struct + func (e *MeasurementBlockElem) Deleted() bool + func (e *MeasurementBlockElem) Name() []byte + func (e *MeasurementBlockElem) SeriesData() []byte + func (e *MeasurementBlockElem) SeriesID(i int) uint32 + func (e *MeasurementBlockElem) SeriesIDs() []uint32 + func (e *MeasurementBlockElem) SeriesN() uint32 + func (e *MeasurementBlockElem) Size() int + func (e *MeasurementBlockElem) TagBlockOffset() int64 + func (e *MeasurementBlockElem) TagBlockSize() int64 + func (e *MeasurementBlockElem) UnmarshalBinary(data []byte) error + type MeasurementBlockTrailer struct + Data struct{ ... } + HashIndex struct{ ... } + Sketch struct{ ... } + TSketch struct{ ... } + Version int + func ReadMeasurementBlockTrailer(data []byte) (MeasurementBlockTrailer, error) + func (t *MeasurementBlockTrailer) WriteTo(w io.Writer) (n int64, err error) + type MeasurementBlockWriter struct + func NewMeasurementBlockWriter() *MeasurementBlockWriter + func (mw *MeasurementBlockWriter) Add(name []byte, deleted bool, offset, size int64, seriesIDs []uint32) + func (mw *MeasurementBlockWriter) WriteTo(w io.Writer) (n int64, err error) + type MeasurementElem interface + Deleted func() bool + Name func() []byte + type MeasurementElems []MeasurementElem + func (a MeasurementElems) Len() int + func (a MeasurementElems) Less(i, j int) bool + func (a MeasurementElems) Swap(i, j int) + type MeasurementIterator interface + Next func() MeasurementElem + func FilterUndeletedMeasurementIterator(itr MeasurementIterator) MeasurementIterator + func MergeMeasurementIterators(itrs ...MeasurementIterator) MeasurementIterator + type SeriesBlock struct + func (blk *SeriesBlock) HasSeries(name []byte, tags models.Tags, buf []byte) (exists, tombstoned bool) + func (blk *SeriesBlock) Offset(name []byte, tags models.Tags, buf []byte) (offset uint32, tombstoned bool) + func (blk *SeriesBlock) Series(name []byte, tags models.Tags) SeriesElem + func (blk *SeriesBlock) SeriesCount() uint32 + func (blk *SeriesBlock) SeriesIterator() SeriesIterator + func (blk *SeriesBlock) UnmarshalBinary(data []byte) error + type SeriesBlockElem struct + func (e *SeriesBlockElem) Deleted() bool + func (e *SeriesBlockElem) Expr() influxql.Expr + func (e *SeriesBlockElem) Name() []byte + func (e *SeriesBlockElem) Tags() models.Tags + func (e *SeriesBlockElem) UnmarshalBinary(data []byte) error + type SeriesBlockEncoder struct + func NewSeriesBlockEncoder(w io.Writer, n uint32, m, k uint64) *SeriesBlockEncoder + func (enc *SeriesBlockEncoder) Close() error + func (enc *SeriesBlockEncoder) Encode(name []byte, tags models.Tags, deleted bool) error + func (enc *SeriesBlockEncoder) N() int64 + type SeriesBlockTrailer struct + Bloom struct{ ... } + Series struct{ ... } + SeriesN int32 + Sketch struct{ ... } + TSketch struct{ ... } + TombstoneN int32 + func ReadSeriesBlockTrailer(data []byte) SeriesBlockTrailer + func (t SeriesBlockTrailer) WriteTo(w io.Writer) (n int64, err error) + type SeriesElem interface + Deleted func() bool + Expr func() influxql.Expr + Name func() []byte + Tags func() models.Tags + type SeriesIterator interface + Next func() SeriesElem + func DifferenceSeriesIterators(itr0, itr1 SeriesIterator) SeriesIterator + func FilterUndeletedSeriesIterator(itr SeriesIterator) SeriesIterator + func IntersectSeriesIterators(itr0, itr1 SeriesIterator) SeriesIterator + func MergeSeriesIterators(itrs ...SeriesIterator) SeriesIterator + func UnionSeriesIterators(itr0, itr1 SeriesIterator) SeriesIterator + type TagBlock struct + func (blk *TagBlock) TagKeyElem(key []byte) TagKeyElem + func (blk *TagBlock) TagKeyIterator() TagKeyIterator + func (blk *TagBlock) TagValueElem(key, value []byte) TagValueElem + func (blk *TagBlock) UnmarshalBinary(data []byte) error + func (blk *TagBlock) Version() int + type TagBlockEncoder struct + func NewTagBlockEncoder(w io.Writer) *TagBlockEncoder + func (enc *TagBlockEncoder) Close() error + func (enc *TagBlockEncoder) EncodeKey(key []byte, deleted bool) error + func (enc *TagBlockEncoder) EncodeValue(value []byte, deleted bool, seriesIDs []uint32) error + func (enc *TagBlockEncoder) N() int64 + type TagBlockKeyElem struct + func (e *TagBlockKeyElem) Deleted() bool + func (e *TagBlockKeyElem) Key() []byte + func (e *TagBlockKeyElem) TagValueIterator() TagValueIterator + type TagBlockTrailer struct + HashIndex struct{ ... } + KeyData struct{ ... } + Size int64 + ValueData struct{ ... } + Version int + func ReadTagBlockTrailer(data []byte) (TagBlockTrailer, error) + func (t *TagBlockTrailer) WriteTo(w io.Writer) (n int64, err error) + type TagBlockValueElem struct + func (e *TagBlockValueElem) Deleted() bool + func (e *TagBlockValueElem) SeriesData() []byte + func (e *TagBlockValueElem) SeriesID(i int) uint32 + func (e *TagBlockValueElem) SeriesIDs() []uint32 + func (e *TagBlockValueElem) SeriesN() uint32 + func (e *TagBlockValueElem) Size() int + func (e *TagBlockValueElem) Value() []byte + type TagKeyElem interface + Deleted func() bool + Key func() []byte + TagValueIterator func() TagValueIterator + type TagKeyIterator interface + Next func() TagKeyElem + func MergeTagKeyIterators(itrs ...TagKeyIterator) TagKeyIterator + type TagValueElem interface + Deleted func() bool + Value func() []byte + type TagValueIterator interface + Next func() TagValueElem + func MergeTagValueIterators(itrs ...TagValueIterator) TagValueIterator