influxdb

package
v1.7.690 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2020 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReadRangePhysKind     = "ReadRangePhysKind"
	ReadGroupPhysKind     = "ReadGroupPhysKind"
	ReadTagKeysPhysKind   = "ReadTagKeysPhysKind"
	ReadTagValuesPhysKind = "ReadTagValuesPhysKind"
)
View Source
const FromKind = "influxDBFrom"

Variables

This section is empty.

Functions

func ReadFilterSource added in v1.7.8

func ReadFilterSource(id execute.DatasetID, r Reader, readSpec ReadFilterSpec, a execute.Administration) execute.Source

func ReadGroupSource added in v1.7.8

func ReadGroupSource(id execute.DatasetID, r Reader, readSpec ReadGroupSpec, a execute.Administration) execute.Source

func ReadTagKeysSource added in v1.7.8

func ReadTagKeysSource(id execute.DatasetID, r Reader, readSpec ReadTagKeysSpec, a execute.Administration) execute.Source

func ReadTagValuesSource added in v1.7.8

func ReadTagValuesSource(id execute.DatasetID, r Reader, readSpec ReadTagValuesSpec, a execute.Administration) execute.Source

Types

type Authorizer

type Authorizer interface {
	AuthorizeDatabase(u meta.User, priv influxql.Privilege, database string) error
}

type BucketsDecoder

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

func (*BucketsDecoder) Close

func (bd *BucketsDecoder) Close() error

func (*BucketsDecoder) Connect

func (bd *BucketsDecoder) Connect(ctx context.Context) error

func (*BucketsDecoder) Decode

func (bd *BucketsDecoder) Decode(ctx context.Context) (flux.Table, error)

func (*BucketsDecoder) Fetch

func (bd *BucketsDecoder) Fetch(ctx context.Context) (bool, error)

type Dependencies

type Dependencies struct {
	StorageDeps StorageDependencies
	FluxDeps    flux.Dependencies
}

func NewDependencies added in v1.7.9

func NewDependencies(
	mc MetaClient,
	reader Reader,
	auth Authorizer,
	authEnabled bool,
) (Dependencies, error)

func (Dependencies) Inject added in v1.7.9

func (d Dependencies) Inject(ctx context.Context) context.Context

type FromDependencies added in v1.7.9

type FromDependencies struct {
	Reader      Reader
	MetaClient  MetaClient
	Authorizer  Authorizer
	AuthEnabled bool
}

func (FromDependencies) Validate added in v1.7.9

func (d FromDependencies) Validate() error

type FromOpSpec

type FromOpSpec struct {
	Bucket   string `json:"bucket,omitempty"`
	BucketID string `json:"bucketID,omitempty"`
}

func (*FromOpSpec) Kind

func (s *FromOpSpec) Kind() flux.OperationKind

type FromProcedureSpec

type FromProcedureSpec struct {
	Bucket   string
	BucketID string
}

func (*FromProcedureSpec) Copy

func (*FromProcedureSpec) Kind

func (*FromProcedureSpec) PostPhysicalValidate

func (s *FromProcedureSpec) PostPhysicalValidate(id plan.NodeID) error

type GroupMode

type GroupMode int
const (
	// GroupModeNone merges all series into a single group.
	GroupModeNone GroupMode = iota
	// GroupModeBy produces a table for each unique value of the specified GroupKeys.
	GroupModeBy
)

func ToGroupMode

func ToGroupMode(fluxMode flux.GroupMode) GroupMode

ToGroupMode accepts the group mode from Flux and produces the appropriate storage group mode.

type MetaClient

type MetaClient interface {
	Databases() []meta.DatabaseInfo
	Database(name string) *meta.DatabaseInfo
}

type PushDownFilterRule added in v1.7.8

type PushDownFilterRule struct{}

PushDownFilterRule is a rule that pushes filters into from procedures to be evaluated in the storage layer. This rule is likely to be replaced by a more generic rule when we have a better framework for pushing filters, etc into sources.

func (PushDownFilterRule) Name added in v1.7.8

func (PushDownFilterRule) Name() string

func (PushDownFilterRule) Pattern added in v1.7.8

func (PushDownFilterRule) Pattern() plan.Pattern

func (PushDownFilterRule) Rewrite added in v1.7.8

func (PushDownFilterRule) Rewrite(pn plan.Node) (plan.Node, bool, error)

type PushDownGroupRule added in v1.7.8

type PushDownGroupRule struct{}

PushDownGroupRule pushes down a group operation to storage

func (PushDownGroupRule) Name added in v1.7.8

func (rule PushDownGroupRule) Name() string

func (PushDownGroupRule) Pattern added in v1.7.8

func (rule PushDownGroupRule) Pattern() plan.Pattern

func (PushDownGroupRule) Rewrite added in v1.7.8

func (rule PushDownGroupRule) Rewrite(node plan.Node) (plan.Node, bool, error)

type PushDownRangeRule added in v1.7.8

type PushDownRangeRule struct{}

PushDownRangeRule pushes down a range filter to storage

func (PushDownRangeRule) Name added in v1.7.8

func (rule PushDownRangeRule) Name() string

func (PushDownRangeRule) Pattern added in v1.7.8

func (rule PushDownRangeRule) Pattern() plan.Pattern

Pattern matches 'from |> range'

func (PushDownRangeRule) Rewrite added in v1.7.8

func (rule PushDownRangeRule) Rewrite(node plan.Node) (plan.Node, bool, error)

Rewrite converts 'from |> range' into 'ReadRange'

type PushDownReadTagKeysRule added in v1.7.8

type PushDownReadTagKeysRule struct{}

PushDownReadTagKeysRule matches 'ReadRange |> keys() |> keep() |> distinct()'. The 'from()' must have already been merged with 'range' and, optionally, may have been merged with 'filter'. If any other properties have been set on the from procedure, this rule will not rewrite anything.

func (PushDownReadTagKeysRule) Name added in v1.7.8

func (rule PushDownReadTagKeysRule) Name() string

func (PushDownReadTagKeysRule) Pattern added in v1.7.8

func (rule PushDownReadTagKeysRule) Pattern() plan.Pattern

func (PushDownReadTagKeysRule) Rewrite added in v1.7.8

func (rule PushDownReadTagKeysRule) Rewrite(pn plan.Node) (plan.Node, bool, error)

type PushDownReadTagValuesRule added in v1.7.8

type PushDownReadTagValuesRule struct{}

PushDownReadTagValuesRule matches 'ReadRange |> keep(columns: [tag]) |> group() |> distinct(column: tag)'. The 'from()' must have already been merged with 'range' and, optionally, may have been merged with 'filter'. If any other properties have been set on the from procedure, this rule will not rewrite anything.

func (PushDownReadTagValuesRule) Name added in v1.7.8

func (rule PushDownReadTagValuesRule) Name() string

func (PushDownReadTagValuesRule) Pattern added in v1.7.8

func (rule PushDownReadTagValuesRule) Pattern() plan.Pattern

func (PushDownReadTagValuesRule) Rewrite added in v1.7.8

func (rule PushDownReadTagValuesRule) Rewrite(pn plan.Node) (plan.Node, bool, error)

type ReadFilterSpec added in v1.7.8

type ReadFilterSpec struct {
	Database        string
	RetentionPolicy string

	Bounds execute.Bounds

	Predicate *semantic.FunctionExpression
}

type ReadGroupPhysSpec added in v1.7.8

type ReadGroupPhysSpec struct {
	plan.DefaultCost
	ReadRangePhysSpec

	GroupMode flux.GroupMode
	GroupKeys []string

	AggregateMethod string
}

func (*ReadGroupPhysSpec) Copy added in v1.7.8

func (*ReadGroupPhysSpec) Kind added in v1.7.8

type ReadGroupSpec added in v1.7.8

type ReadGroupSpec struct {
	ReadFilterSpec

	GroupMode GroupMode
	GroupKeys []string

	AggregateMethod string
}

type ReadRangePhysSpec added in v1.7.8

type ReadRangePhysSpec struct {
	plan.DefaultCost

	Bucket   string
	BucketID string

	// FilterSet is set to true if there is a filter.
	FilterSet bool
	// Filter is the filter to use when calling into
	// storage. It must be possible to push down this
	// filter.
	Filter *semantic.FunctionExpression

	Bounds flux.Bounds
}

func (*ReadRangePhysSpec) Copy added in v1.7.8

func (*ReadRangePhysSpec) Kind added in v1.7.8

func (*ReadRangePhysSpec) LookupDatabase added in v1.7.8

func (*ReadRangePhysSpec) TimeBounds added in v1.7.8

func (s *ReadRangePhysSpec) TimeBounds(predecessorBounds *plan.Bounds) *plan.Bounds

TimeBounds implements plan.BoundsAwareProcedureSpec.

type ReadTagKeysPhysSpec added in v1.7.8

type ReadTagKeysPhysSpec struct {
	ReadRangePhysSpec
}

func (*ReadTagKeysPhysSpec) Copy added in v1.7.8

func (*ReadTagKeysPhysSpec) Kind added in v1.7.8

type ReadTagKeysSpec added in v1.7.8

type ReadTagKeysSpec struct {
	ReadFilterSpec
}

type ReadTagValuesPhysSpec added in v1.7.8

type ReadTagValuesPhysSpec struct {
	ReadRangePhysSpec
	TagKey string
}

func (*ReadTagValuesPhysSpec) Copy added in v1.7.8

func (*ReadTagValuesPhysSpec) Kind added in v1.7.8

type ReadTagValuesSpec added in v1.7.8

type ReadTagValuesSpec struct {
	ReadFilterSpec
	TagKey string
}

type Reader

type Reader interface {
	ReadFilter(ctx context.Context, spec ReadFilterSpec, alloc *memory.Allocator) (TableIterator, error)
	ReadGroup(ctx context.Context, spec ReadGroupSpec, alloc *memory.Allocator) (TableIterator, error)

	ReadTagKeys(ctx context.Context, spec ReadTagKeysSpec, alloc *memory.Allocator) (TableIterator, error)
	ReadTagValues(ctx context.Context, spec ReadTagValuesSpec, alloc *memory.Allocator) (TableIterator, error)

	Close()
}

type Source added in v1.7.8

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

func (*Source) AddTransformation added in v1.7.8

func (s *Source) AddTransformation(t execute.Transformation)

func (*Source) Metadata added in v1.7.8

func (s *Source) Metadata() flux.Metadata

func (*Source) Run added in v1.7.8

func (s *Source) Run(ctx context.Context)

type StorageDependencies added in v1.7.9

type StorageDependencies struct {
	Reader      Reader
	MetaClient  MetaClient
	Authorizer  Authorizer
	AuthEnabled bool
}

func GetStorageDependencies added in v1.7.9

func GetStorageDependencies(ctx context.Context) StorageDependencies

func (StorageDependencies) Inject added in v1.7.9

func (StorageDependencies) Validate added in v1.7.9

func (d StorageDependencies) Validate() error

type TableIterator added in v1.7.8

type TableIterator interface {
	flux.TableIterator
	Statistics() cursors.CursorStats
}

TableIterator is a table iterator that also keeps track of cursor statistics from the storage engine.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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