executor

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TaskTypePython         = "python"
	TaskTypeSnowflakeQuery = "sf.sql"
	TaskTypeBigqueryQuery  = "bq.sql"
	TaskTypeEmpty          = "empty"
)
View Source
const (
	KeyPrinter contextKey = iota
)

Variables

View Source
var DefaultExecutors = map[string]Operator{
	TaskTypeBigqueryQuery:                  NoOpOperator{},
	"bq.sensor.table":                      NoOpOperator{},
	"bq.sensor.query":                      NoOpOperator{},
	"bq.cost_tracker":                      NoOpOperator{},
	"bq.transfer":                          NoOpOperator{},
	"bq.sensor.partition":                  NoOpOperator{},
	"gcs.from.s3":                          NoOpOperator{},
	"gcs.sensor.object_sensor_with_prefix": NoOpOperator{},
	"gcs.sensor.object":                    NoOpOperator{},
	TaskTypeEmpty:                          NoOpOperator{},
	"athena.sql":                           NoOpOperator{},
	"athena.sensor.query":                  NoOpOperator{},
	TaskTypePython:                         NoOpOperator{},
	"python.beta":                          NoOpOperator{},
	"python.legacy":                        NoOpOperator{},
	"s3.sensor.key_sensor":                 NoOpOperator{},
	TaskTypeSnowflakeQuery:                 NoOpOperator{},
	"adjust.export.bq":                     NoOpOperator{},
	"appsflyer.export.bq":                  NoOpOperator{},
}

DefaultExecutors are set to NoOp executors by default. It serves both as a safe default and a list of supported task types.

Functions

This section is empty.

Types

type Concurrent

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

func NewConcurrent

func NewConcurrent(
	logger *zap.SugaredLogger,
	taskTypeMap map[string]Operator,
	workerCount int,
) *Concurrent

func (Concurrent) Start

func (c Concurrent) Start(input chan *scheduler.TaskInstance, result chan<- *scheduler.TaskExecutionResult)

type NoOpOperator

type NoOpOperator struct{}

func (NoOpOperator) RunTask

type Operator

type Operator interface {
	RunTask(ctx context.Context, p *pipeline.Pipeline, t *pipeline.Task) error
}

type Sequential

type Sequential struct {
	TaskTypeMap map[string]Operator
}

func (Sequential) RunSingleTask

func (s Sequential) RunSingleTask(ctx context.Context, pipeline *pipeline.Pipeline, task *pipeline.Task) error

Jump to

Keyboard shortcuts

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