influxdb

package
v1.7.6 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2019 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const FromKind = "influxDBFrom"
View Source
const PhysicalFromKind = "physFrom"

Variables

This section is empty.

Functions

func InjectBucketDependencies

func InjectBucketDependencies(depsMap execute.Dependencies, deps BucketDependencies) error

func InjectFromDependencies

func InjectFromDependencies(depsMap execute.Dependencies, deps Dependencies) error

func NewSource

func NewSource(id execute.DatasetID, r Reader, readSpec ReadSpec, bounds execute.Bounds, w execute.Window, currentTime execute.Time, alloc *memory.Allocator) execute.Source

Types

type Authorizer

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

type BucketDependencies

type BucketDependencies struct {
	MetaClient  MetaClient
	Authorizer  Authorizer
	AuthEnabled bool
}

func (BucketDependencies) Validate

func (d BucketDependencies) Validate() 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() error

func (*BucketsDecoder) Decode

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

func (*BucketsDecoder) Fetch

func (bd *BucketsDecoder) Fetch() (bool, error)

type Dependencies

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

func (Dependencies) Validate

func (d Dependencies) Validate() error

type FromConversionRule

type FromConversionRule struct {
}

FromConversionRule converts a logical `from` node into a physical `from` node. TODO(cwolff): this rule can go away when we require a `range`

to be pushed into a logical `from` to create a physical `from.`

func (FromConversionRule) Name

func (FromConversionRule) Name() string

func (FromConversionRule) Pattern

func (FromConversionRule) Pattern() plan.Pattern

func (FromConversionRule) Rewrite

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

type FromDistinctRule

type FromDistinctRule struct {
}

func (FromDistinctRule) Name

func (FromDistinctRule) Name() string

func (FromDistinctRule) Pattern

func (FromDistinctRule) Pattern() plan.Pattern

func (FromDistinctRule) Rewrite

func (FromDistinctRule) Rewrite(distinctNode plan.Node) (plan.Node, bool, error)

type FromKeysRule

type FromKeysRule struct {
}

func (FromKeysRule) Name

func (FromKeysRule) Name() string

func (FromKeysRule) Pattern

func (FromKeysRule) Pattern() plan.Pattern

func (FromKeysRule) Rewrite

func (FromKeysRule) Rewrite(keysNode plan.Node) (plan.Node, bool, 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 (
	// GroupModeDefault specifies the default grouping mode, which is GroupModeAll.
	GroupModeDefault GroupMode = 0
	// GroupModeNone merges all series into a single group.
	GroupModeNone GroupMode = 1 << iota
	// GroupModeAll produces a separate table for each series.
	GroupModeAll
	// GroupModeBy produces a table for each unique value of the specified GroupKeys.
	GroupModeBy
	// GroupModeExcept produces a table for the unique values of all keys, except those specified by GroupKeys.
	GroupModeExcept
)

func ToGroupMode

func ToGroupMode(fluxMode flux.GroupMode) GroupMode

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

type MergeFromFilterRule

type MergeFromFilterRule struct{}

MergeFromFilterRule 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 (MergeFromFilterRule) Name

func (MergeFromFilterRule) Name() string

func (MergeFromFilterRule) Pattern

func (MergeFromFilterRule) Pattern() plan.Pattern

func (MergeFromFilterRule) Rewrite

func (MergeFromFilterRule) Rewrite(filterNode plan.Node) (plan.Node, bool, error)

type MergeFromGroupRule

type MergeFromGroupRule struct {
}

func (MergeFromGroupRule) Name

func (MergeFromGroupRule) Name() string

func (MergeFromGroupRule) Pattern

func (MergeFromGroupRule) Pattern() plan.Pattern

func (MergeFromGroupRule) Rewrite

func (MergeFromGroupRule) Rewrite(groupNode plan.Node) (plan.Node, bool, error)

type MergeFromRangeRule

type MergeFromRangeRule struct{}

MergeFromRangeRule pushes a `range` into a `from`.

func (MergeFromRangeRule) Name

func (rule MergeFromRangeRule) Name() string

Name returns the name of the rule.

func (MergeFromRangeRule) Pattern

func (rule MergeFromRangeRule) Pattern() plan.Pattern

Pattern returns the pattern that matches `from -> range`.

func (MergeFromRangeRule) Rewrite

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

Rewrite attempts to rewrite a `from -> range` into a `FromRange`.

type MetaClient

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

type PhysicalFromProcedureSpec

type PhysicalFromProcedureSpec struct {
	FromProcedureSpec

	plan.DefaultCost
	BoundsSet bool
	Bounds    flux.Bounds

	FilterSet bool
	Filter    *semantic.FunctionExpression

	DescendingSet bool
	Descending    bool

	LimitSet     bool
	PointsLimit  int64
	SeriesLimit  int64
	SeriesOffset int64

	WindowSet bool
	Window    plan.WindowSpec

	GroupingSet bool
	OrderByTime bool
	GroupMode   flux.GroupMode
	GroupKeys   []string

	AggregateSet    bool
	AggregateMethod string
}

func (*PhysicalFromProcedureSpec) Copy

func (PhysicalFromProcedureSpec) Kind

func (PhysicalFromProcedureSpec) PostPhysicalValidate

func (s PhysicalFromProcedureSpec) PostPhysicalValidate(id plan.NodeID) error

func (*PhysicalFromProcedureSpec) TimeBounds

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

TimeBounds implements plan.BoundsAwareProcedureSpec.

type ReadSpec

type ReadSpec struct {
	Database        string
	RetentionPolicy string

	RAMLimit     uint64
	Hosts        []string
	Predicate    *semantic.FunctionExpression
	PointsLimit  int64
	SeriesLimit  int64
	SeriesOffset int64
	Descending   bool

	AggregateMethod string

	// OrderByTime indicates that series reads should produce all
	// series for a time before producing any series for a larger time.
	// By default this is false meaning all values of time are produced for a given series,
	// before any values are produced from the next series.
	OrderByTime bool
	// GroupMode instructs
	GroupMode GroupMode
	// GroupKeys is the list of dimensions along which to group.
	//
	// When GroupMode is GroupModeBy, the results will be grouped by the specified keys.
	// When GroupMode is GroupModeExcept, the results will be grouped by all keys, except those specified.
	GroupKeys []string
}

type Reader

type Reader interface {
	Read(ctx context.Context, rs ReadSpec, start, stop execute.Time, alloc *memory.Allocator) (flux.TableIterator, error)
	Close()
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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