Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Aggregates = []Aggregate{ { Table: "v1_agg_task_statuses_minute_olap", // contains filtered or unexported fields }, { Table: "v1_agg_task_events_minute_olap", // contains filtered or unexported fields }, { Table: "v1_agg_events_minute_olap", // contains filtered or unexported fields }, }
Functions ¶
func CompactionLockKey ¶
Types ¶
type Aggregate ¶
type Aggregate struct {
// Table is the aggregate table, used to find its partitions.
Table string
// contains filtered or unexported fields
}
Aggregate is one aggregate table and the query that compacts its delta table.
type Aggregator ¶
type Aggregator struct {
// contains filtered or unexported fields
}
func New ¶
func New(pool sqlchelpers.Pool, l *zerolog.Logger, opts Opts) *Aggregator
func (*Aggregator) Start ¶
func (a *Aggregator) Start() func()
type Opts ¶
type Opts struct {
// BatchSize is the number of delta rows one compaction statement folds.
BatchSize int
// Partitions is the number of hash partitions of each delta table. Each partition has its
// own compactor on every instance, and compactors of the same partition on different
// instances skip each other's rows.
Partitions int
// PollInterval is how long a compactor waits after finding nothing to fold. Under load it
// folds back to back, so this only bounds how long deltas wait when the system is idle.
PollInterval time.Duration
}
func DefaultOpts ¶
func DefaultOpts() Opts
Click to show internal directories.
Click to hide internal directories.