cockroach: github.com/cockroachdb/cockroach/pkg/storage/compactor Index | Files

package compactor

import "github.com/cockroachdb/cockroach/pkg/storage/compactor"

Index

Package Files

compactor.go metrics.go settings.go

type Compactor Uses

type Compactor struct {
    Metrics Metrics
    // contains filtered or unexported fields
}

A Compactor records suggested compactions and periodically makes requests to the engine to reclaim storage space.

func NewCompactor Uses

func NewCompactor(
    st *cluster.Settings, eng engine.WithSSTables, capFn storeCapacityFunc, doneFn doneCompactingFunc,
) *Compactor

NewCompactor returns a compactor for the specified storage engine.

func (*Compactor) Start Uses

func (c *Compactor) Start(ctx context.Context, stopper *stop.Stopper)

Start launches a compaction processing goroutine and exits when the provided stopper indicates. Processing is done with a periodicity of compactionMinInterval, but only if there are compactions pending.

func (*Compactor) Suggest Uses

func (c *Compactor) Suggest(ctx context.Context, sc storagepb.SuggestedCompaction)

Suggest writes the specified compaction to persistent storage and pings the processing goroutine.

type Metrics Uses

type Metrics struct {
    BytesQueued         *metric.Gauge
    BytesSkipped        *metric.Counter
    BytesCompacted      *metric.Counter
    CompactionSuccesses *metric.Counter
    CompactionFailures  *metric.Counter
    CompactingNanos     *metric.Counter
}

Metrics holds all metrics relating to a Compactor.

func (Metrics) MetricStruct Uses

func (Metrics) MetricStruct()

MetricStruct implements the metrics.Struct interface.

Package compactor imports 18 packages (graph) and is imported by 1 packages. Updated 2019-07-29. Refresh now. Tools for package owners.