compactor

package
v2.4.3 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2022 License: AGPL-3.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Compactor

type Compactor struct {
	services.Service

	DeleteRequestsHandler *deletion.DeleteRequestHandler
	// contains filtered or unexported fields
}

func NewCompactor

func NewCompactor(cfg Config, storageConfig storage.Config, schemaConfig loki_storage.SchemaConfig, limits retention.Limits, clientMetrics storage.ClientMetrics, r prometheus.Registerer) (*Compactor, error)

func (*Compactor) CompactTable

func (c *Compactor) CompactTable(ctx context.Context, tableName string, applyRetention bool) error

func (*Compactor) OnRingInstanceHeartbeat

func (c *Compactor) OnRingInstanceHeartbeat(_ *ring.BasicLifecycler, _ *ring.Desc, _ *ring.InstanceDesc)

func (*Compactor) OnRingInstanceRegister

func (c *Compactor) OnRingInstanceRegister(_ *ring.BasicLifecycler, ringDesc ring.Desc, instanceExists bool, instanceID string, instanceDesc ring.InstanceDesc) (ring.InstanceState, ring.Tokens)

func (*Compactor) OnRingInstanceStopping

func (c *Compactor) OnRingInstanceStopping(_ *ring.BasicLifecycler)

func (*Compactor) OnRingInstanceTokens

func (c *Compactor) OnRingInstanceTokens(_ *ring.BasicLifecycler, _ ring.Tokens)

func (*Compactor) RunCompaction

func (c *Compactor) RunCompaction(ctx context.Context, applyRetention bool) error

func (*Compactor) ServeHTTP

func (c *Compactor) ServeHTTP(w http.ResponseWriter, req *http.Request)

type Config

type Config struct {
	WorkingDirectory          string          `yaml:"working_directory"`
	SharedStoreType           string          `yaml:"shared_store"`
	SharedStoreKeyPrefix      string          `yaml:"shared_store_key_prefix"`
	CompactionInterval        time.Duration   `yaml:"compaction_interval"`
	ApplyRetentionInterval    time.Duration   `yaml:"apply_retention_interval"`
	RetentionEnabled          bool            `yaml:"retention_enabled"`
	RetentionDeleteDelay      time.Duration   `yaml:"retention_delete_delay"`
	RetentionDeleteWorkCount  int             `yaml:"retention_delete_worker_count"`
	DeleteRequestCancelPeriod time.Duration   `yaml:"delete_request_cancel_period"`
	MaxCompactionParallelism  int             `yaml:"max_compaction_parallelism"`
	CompactorRing             util.RingConfig `yaml:"compactor_ring,omitempty"`
}

func (*Config) RegisterFlags

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

RegisterFlags registers flags.

func (*Config) Validate

func (cfg *Config) Validate() error

Validate verifies the config does not contain inappropriate values

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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