Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
func New ¶
func New( cfg Config, limits Limits, _ config.SchemaConfig, _ storage.Config, _ storage.ClientMetrics, fetcherProvider stores.ChunkFetcherProvider, bloomStore bloomshipper.Store, logger log.Logger, r prometheus.Registerer, rm *ring.RingManager, ) (*Builder, error)
type ChunkItersByFingerprint ¶
type ChunkItersByFingerprint struct {
// contains filtered or unexported fields
}
ChunkItersByFingerprint models the chunks belonging to a fingerprint
type ChunkLoader ¶
type ChunkLoader interface {
Load(ctx context.Context, userID string, series *v1.Series) *ChunkItersByFingerprint
}
ChunkLoader loads chunks from a store
type Config ¶
type Config struct { GrpcConfig grpcclient.Config `yaml:"grpc_config"` PlannerAddress string `yaml:"planner_address"` BackoffConfig backoff.Config `yaml:"backoff_config"` WorkingDir string `yaml:"working_directory" doc:"hidden"` }
Config configures the bloom-builder component.
func (*Config) RegisterFlagsWithPrefix ¶
RegisterFlagsWithPrefix registers flags for the bloom-planner configuration.
type LazyBlockBuilderIterator ¶
type LazyBlockBuilderIterator struct {
// contains filtered or unexported fields
}
LazyBlockBuilderIterator is a lazy iterator over blocks that builds each block by adding series to them until they are full.
func NewLazyBlockBuilderIterator ¶
func NewLazyBlockBuilderIterator( ctx context.Context, opts v1.BlockOptions, metrics *v1.Metrics, logger log.Logger, populate v1.BloomPopulatorFunc, writerReaderFunc func() (v1.BlockWriter, v1.BlockReader), series iter.PeekIterator[*v1.Series], blocks iter.ResetIterator[*v1.SeriesWithBlooms], ) *LazyBlockBuilderIterator
func (*LazyBlockBuilderIterator) At ¶
func (b *LazyBlockBuilderIterator) At() *v1.Block
func (*LazyBlockBuilderIterator) Bytes ¶
func (b *LazyBlockBuilderIterator) Bytes() (bytes int)
func (*LazyBlockBuilderIterator) Err ¶
func (b *LazyBlockBuilderIterator) Err() error
func (*LazyBlockBuilderIterator) Next ¶
func (b *LazyBlockBuilderIterator) Next() bool
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
func NewMetrics ¶
func NewMetrics(r prometheus.Registerer) *Metrics
type SimpleBloomGenerator ¶
type SimpleBloomGenerator struct {
// contains filtered or unexported fields
}
Simple implementation of a BloomGenerator.
func NewSimpleBloomGenerator ¶
func NewSimpleBloomGenerator( userID string, opts v1.BlockOptions, store iter.Iterator[*v1.Series], chunkLoader ChunkLoader, blocksIter iter.ResetIterator[*v1.SeriesWithBlooms], writerReaderFunc func() (v1.BlockWriter, v1.BlockReader), reporter func(model.Fingerprint), metrics *v1.Metrics, logger log.Logger, ) *SimpleBloomGenerator
SimpleBloomGenerator is a foundational implementation of BloomGenerator. It mainly wires up a few different components to generate bloom filters for a set of blocks and handles schema compatibility: Blocks which are incompatible with the schema are skipped and will have their chunks reindexed
func (*SimpleBloomGenerator) Generate ¶
func (s *SimpleBloomGenerator) Generate(ctx context.Context) *LazyBlockBuilderIterator
type StoreChunkLoader ¶
type StoreChunkLoader struct {
// contains filtered or unexported fields
}
StoreChunkLoader loads chunks from a store
func NewStoreChunkLoader ¶
func NewStoreChunkLoader(fetcherProvider stores.ChunkFetcherProvider, metrics *Metrics) *StoreChunkLoader
func (*StoreChunkLoader) Load ¶
func (s *StoreChunkLoader) Load(ctx context.Context, userID string, series *v1.Series) *ChunkItersByFingerprint