blockbuilder

package
v3.1.0-rc.1.0...-6d180dd Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: AGPL-3.0 Imports: 42 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConsumerGroup = "block-builder"
)

Variables

This section is empty.

Functions

func NewWriteableBlock

func NewWriteableBlock(backendBlock common.BackendBlock, r backend.Reader, w backend.Writer) tempodb.WriteableBlock

Types

type BlockBuilder

type BlockBuilder struct {
	services.Service
	// contains filtered or unexported fields
}

func New

func New(
	cfg Config,
	logger log.Logger,
	partitionRing ring.PartitionRingReader,
	overrides Overrides,
	store storage.Store,
) (*BlockBuilder, error)

type BlockConfig

type BlockConfig struct {
	MaxBlockBytes uint64 `yaml:"max_block_bytes" doc:"Maximum size of a block."`

	// holds the block settings from the storage sections, it is not configurable via YAML
	common.BlockConfig `yaml:"-"`
}

func (*BlockConfig) RegisterFlags

func (c *BlockConfig) RegisterFlags(f *flag.FlagSet)

func (*BlockConfig) RegisterFlagsAndApplyDefaults

func (c *BlockConfig) RegisterFlagsAndApplyDefaults(prefix string, f *flag.FlagSet)

type Config

type Config struct {
	InstanceID            string             `yaml:"instance_id" doc:"Instance id."`
	AssignedPartitionsMap map[string][]int32 `yaml:"assigned_partitions" doc:"List of partitions assigned to this block builder."`
	PartitionsPerInstance int                `yaml:"partitions_per_instance" doc:"Number of partitions assigned to this block builder."`
	ConsumeCycleDuration  time.Duration      `yaml:"consume_cycle_duration" doc:"Interval between consumption cycles."`
	MaxBytesPerCycle      uint64             `yaml:"max_consuming_bytes" doc:"Maximum number of bytes that can be consumed in a single cycle.  0 to disable"`
	FlushConcurrency      int                `yaml:"flush_concurrency" doc:"Maximum number of tenants to flush concurrently per partition section."`

	BlockConfig BlockConfig `yaml:"block" doc:"Configuration for the block builder."`
	WAL         wal.Config  `yaml:"wal" doc:"Configuration for the write ahead log."`

	// This config is dynamically injected because defined outside the ingester config.
	IngestStorageConfig ingest.Config `yaml:"-"`
}

func (*Config) AssignedPartitions

func (c *Config) AssignedPartitions() []int32

func (*Config) RegisterFlags

func (c *Config) RegisterFlags(f *flag.FlagSet)

func (*Config) RegisterFlagsAndApplyDefaults

func (c *Config) RegisterFlagsAndApplyDefaults(prefix string, f *flag.FlagSet)

func (*Config) Validate

func (c *Config) Validate() error

type Overrides

type Overrides interface {
	MaxBytesPerTrace(string) int
	DedicatedColumns(string) backend.DedicatedColumns
}

Overrides is just the set of overrides needed here.

type WriteableBlock

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

WriteableBlock is a trimmed down version of ingester.LocalBlock

func (*WriteableBlock) BlockMeta

func (b *WriteableBlock) BlockMeta() *backend.BlockMeta

func (*WriteableBlock) Write

func (b *WriteableBlock) Write(ctx context.Context, w backend.Writer) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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