Documentation
¶
Index ¶
- func GetSeriesToChunkMapping(HashValue string, RangeValue []byte) (user string, index int, seriesID string, chunkID string, err error)
- func IsMetricLabelToLabelValueMapping(RangeValue []byte) bool
- func IsMetricToSeriesMapping(RangeValue []byte) bool
- func IsSeriesToChunkMapping(RangeValue []byte) bool
- func IsSeriesToLabelValues(RangeValue []byte) bool
- func UnknownIndexEntryType(RangeValue []byte) string
- type Config
- type IndexEntryProcessor
- type IndexReader
- type Scanner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSeriesToChunkMapping ¶
func GetSeriesToChunkMapping(HashValue string, RangeValue []byte) (user string, index int, seriesID string, chunkID string, err error)
e.RangeValue is: "userID:d<Index>:base64(sha256(labels))". Index is integer, base64 doesn't contain ':'.
func IsMetricToSeriesMapping ¶
func IsSeriesToChunkMapping ¶
Series to Chunk mapping uses \0 "3" \0 suffix of range value.
func IsSeriesToLabelValues ¶
func UnknownIndexEntryType ¶
Types ¶
type Config ¶
type Config struct {
TableNames string
TablesLimit int
PeriodStart flagext.DayValue
PeriodEnd flagext.DayValue
OutputDirectory string
Concurrency int
VerifyPlans bool
UploadFiles bool
KeepFiles bool
AllowedUsers string
IgnoredUserPattern string
}
func (*Config) RegisterFlags ¶
type IndexEntryProcessor ¶
type IndexEntryProcessor interface {
ProcessIndexEntry(indexEntry chunk.IndexEntry) error
// Called at the end of reading of index entries.
Flush() error
}
Processor that receives index entries from the table.
type IndexReader ¶
type IndexReader interface {
IndexTableNames(ctx context.Context) ([]string, error)
// Reads a single table from index, and passes individual index entries to the processors.
//
// All entries with the same TableName, HashValue and RangeValue are passed to the same processor,
// and all such entries (with different Values) are passed before index entries with different
// values of HashValue and RangeValue are passed to the same processor.
//
// This allows IndexEntryProcessor to find when values for given Hash and Range finish:
// as soon as new Hash and Range differ from last IndexEntry.
//
// Index entries passed to the same processor arrive sorted by HashValue and RangeValue.
ReadIndexEntries(ctx context.Context, table string, processors []IndexEntryProcessor) error
}
IndexReader parses index entries and passes them to the IndexEntryProcessor.
type Scanner ¶
func NewScanner ¶
func NewScanner(cfg Config, scfg blocksconvert.SharedConfig, l log.Logger, reg prometheus.Registerer) (*Scanner, error)
Click to show internal directories.
Click to hide internal directories.