builder

package
v3.3.2 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: AGPL-3.0 Imports: 42 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder struct {
	services.Service

	ID string
	// contains filtered or unexported fields
}

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

func (cfg *Config) RegisterFlagsWithPrefix(prefix string, f *flag.FlagSet)

RegisterFlagsWithPrefix registers flags for the bloom-planner configuration.

func (*Config) Validate

func (cfg *Config) Validate() error

type FetchFunc

type FetchFunc[A, B any] func(ctx context.Context, inputs []A) ([]B, error)

func (FetchFunc[A, B]) Fetch

func (f FetchFunc[A, B]) Fetch(ctx context.Context, inputs []A) ([]B, error)

type Fetcher

type Fetcher[A, B any] interface {
	Fetch(ctx context.Context, inputs []A) ([]B, error)
}

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 (*LazyBlockBuilderIterator) Bytes

func (b *LazyBlockBuilderIterator) Bytes() (bytes int)

func (*LazyBlockBuilderIterator) Err

func (*LazyBlockBuilderIterator) Next

func (b *LazyBlockBuilderIterator) Next() bool

type Limits

type Limits interface {
	BloomBlockEncoding(tenantID string) string
	BloomMaxBlockSize(tenantID string) int
	BloomMaxBloomSize(tenantID string) int
}

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

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

Jump to

Keyboard shortcuts

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