stage

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PlanNode

type PlanNode interface {
	// Execute executes the operator of current node.
	Execute() error
	// ExecuteWithStats executes the operator of current node with stats.
	ExecuteWithStats() (stats *models.OperatorStats, err error)
	// Children returns the children nodes of current node.
	Children() []PlanNode
	// AddChild adds child node.
	AddChild(node PlanNode)
	// IgnoreNotFound returns if the stage ignore not found error.
	IgnoreNotFound() bool
}

PlanNode represents the node of plan tree.

func NewEmptyPlanNode

func NewEmptyPlanNode() PlanNode

NewEmptyPlanNode creates a PlanNode without operator.

func NewPlanNode

func NewPlanNode(op operator.Operator) PlanNode

NewPlanNode creates a PlanNode with operator.

func NewPlanNodeWithIgnore

func NewPlanNodeWithIgnore(op operator.Operator) PlanNode

NewPlanNodeWithIgnore creates a PlanNode with operator, need ignore not found error.

type Stage

type Stage interface {
	// Identifier returns identifier value of current stage.
	Identifier() string
	// Stats returns the execution stats of current stage.
	Stats() []*models.OperatorStats
	// Type returns the type of stage.
	Type() Type
	// Plan plans sub execute tree for this stage.
	Plan() PlanNode
	// NextStages returns the next stages after this stage completed.
	NextStages() []Stage
	// Execute executes the plan tree of this stage.
	Execute(node PlanNode, completeHandle func(), errHandle func(err error))
	// Complete completes this stage, does some resource release operate.
	Complete()
	// IsAsync returns stage if stage async execute.
	IsAsync() bool
}

Stage represents stage under execute pipeline.

func NewDataLoadStage

func NewDataLoadStage(leafExecuteCtx *context.LeafExecuteContext,
	executeCtx *flow.DataLoadContext, segmentRS *flow.TimeSegmentResultSet,
) Stage

NewDataLoadStage creates a dataLoadStage instance.

func NewGroupingStage

func NewGroupingStage(leafExecuteCtx *context.LeafExecuteContext, executeCtx *flow.DataLoadContext, shard tsdb.Shard) Stage

NewGroupingStage creates a groupingStage instance.

func NewMetadataLookupStage

func NewMetadataLookupStage(leafExecuteCtx *context.LeafExecuteContext) Stage

NewMetadataLookupStage creates a metadataLookupStage instance.

func NewMetadataSuggestStage

func NewMetadataSuggestStage(ctx *context.LeafMetadataContext) Stage

NewMetadataSuggestStage creates a metadataSuggestStage instance.

func NewPhysicalPlanStage added in v0.2.4

func NewPhysicalPlanStage(taskCtx context.TaskContext) Stage

func NewShardLookupStage

func NewShardLookupStage(executeCtx *context.LeafMetadataContext, shardExecuteCtx *flow.ShardExecuteContext, shard tsdb.Shard) Stage

NewShardLookupStage creates a shardLookupStage instance.

func NewShardScanStage

func NewShardScanStage(leafExecuteCtx *context.LeafExecuteContext,
	shardExecuteCtx *flow.ShardExecuteContext, shard tsdb.Shard,
) Stage

NewShardScanStage creates a shardScanStage instance.

func NewTaskSendStage added in v0.2.4

func NewTaskSendStage(taskCtx context.TaskContext, target string, req *protoCommonV1.TaskRequest) Stage

NewTaskSendStage creates a taskSendStage instance.

type Type

type Type int

Type represents the type of stage.

const (
	// Unknown represents unknown stage.
	Unknown Type = iota
	// MetadataLookup represents metadata lookup stage.
	MetadataLookup
	// ShardScan represents shard scan stage.
	ShardScan
	// Grouping represents grouping stage.
	Grouping
	// DataLoad represents data load stage.
	DataLoad
	// MetadataSuggest represents metadata suggest stage.
	MetadataSuggest
	// ShardLookup represents shard lookup stage.
	ShardLookup
	// PhysicalPlan represents physical plan stage.
	PhysicalPlan
	// TaskSend represents task send stage.
	TaskSend
)

func (Type) String

func (t Type) String() string

String returns string value of stage type.

Jump to

Keyboard shortcuts

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