metrictank: github.com/grafana/metrictank/idx/bigtable Index | Files

package bigtable

import "github.com/grafana/metrictank/idx/bigtable"

Index

Package Files

bigtable.go config.go schema.go

Constants

const COLUMN_FAMILY = "idx"

Variables

var CliConfig = NewIdxConfig()

func ConfigProcess Uses

func ConfigProcess()

func ConfigSetup Uses

func ConfigSetup()

func DecodeRowKey Uses

func DecodeRowKey(key string) (schema.MKey, int32, error)

DecodeRowKey takes a rowKey string and returns the corresponding MKey and partition

func FormatRowKey Uses

func FormatRowKey(mkey schema.MKey, partition int32) string

FormatRowKey formats an MKey and partition into a rowKey

func RowToSchema Uses

func RowToSchema(row bigtable.Row, def *schema.MetricDefinition) error

RowToSchema takes a row and unmarshals the data into the provided MetricDefinition.

func SchemaToRow Uses

func SchemaToRow(def *schema.MetricDefinition) (string, map[string][]byte)

SchemaToRow takes a metricDefintion and returns a rowKey and column data.

type BigtableIdx Uses

type BigtableIdx struct {
    memory.MemoryIndex
    // contains filtered or unexported fields
}

func New Uses

func New(cfg *IdxConfig) *BigtableIdx

func (*BigtableIdx) AddOrUpdate Uses

func (b *BigtableIdx) AddOrUpdate(mkey schema.MKey, data *schema.MetricData, partition int32) (idx.Archive, int32, bool)

func (*BigtableIdx) Delete Uses

func (b *BigtableIdx) Delete(orgId uint32, pattern string) ([]idx.Archive, error)

func (*BigtableIdx) DeleteTagged Uses

func (b *BigtableIdx) DeleteTagged(orgId uint32, query tagquery.Query) ([]idx.Archive, error)

func (*BigtableIdx) Find Uses

func (b *BigtableIdx) Find(orgId uint32, pattern string, from int64) ([]idx.Node, error)

func (*BigtableIdx) Init Uses

func (b *BigtableIdx) Init() error

Init makes sure the tables and columFamilies exist. It also opens the table for reads/writes. Then rebuilds the in-memory index, sets up write queues, metrics and pruning routines

func (*BigtableIdx) InitBare Uses

func (b *BigtableIdx) InitBare() error

InitBare creates the client and makes sure the tables and columFamilies exist. It also opens the table for reads/writes.

func (*BigtableIdx) LoadPartition Uses

func (b *BigtableIdx) LoadPartition(partition int32, defs []schema.MetricDefinition, now time.Time) []schema.MetricDefinition

func (*BigtableIdx) Prune Uses

func (b *BigtableIdx) Prune(now time.Time) ([]idx.Archive, error)

func (*BigtableIdx) Stop Uses

func (b *BigtableIdx) Stop()

func (*BigtableIdx) Update Uses

func (b *BigtableIdx) Update(point schema.MetricPoint, partition int32) (idx.Archive, int32, bool)

Update updates an existing archive, if found. It returns whether it was found, and - if so - the (updated) existing archive and its old partition

type IdxConfig Uses

type IdxConfig struct {
    Enabled           bool
    GcpProject        string
    BigtableInstance  string
    TableName         string
    WriteQueueSize    int
    WriteMaxFlushSize int
    WriteConcurrency  int
    UpdateBigtableIdx bool
    UpdateInterval    time.Duration

    PruneInterval time.Duration
    CreateCF      bool
    // contains filtered or unexported fields
}

func NewIdxConfig Uses

func NewIdxConfig() *IdxConfig

return StoreConfig with default values set.

func (*IdxConfig) Validate Uses

func (cfg *IdxConfig) Validate() error

Package bigtable imports 21 packages (graph). Updated 2020-07-15. Refresh now. Tools for package owners.