beam: github.com/apache/beam/sdks/go/pkg/beam/runners/direct Index | Files

package direct

import "github.com/apache/beam/sdks/go/pkg/beam/runners/direct"

Package direct contains the direct runner for running single-bundle pipelines in the current process. Useful for testing.

Index

Package Files

buffer.go direct.go gbk.go impulse.go

func Compile Uses

func Compile(edges []*graph.MultiEdge) (*exec.Plan, error)

Compile translates a pipeline to a multi-bundle execution plan.

func Execute Uses

func Execute(ctx context.Context, p *beam.Pipeline) error

Execute runs the pipeline in-process.

type CoGBK Uses

type CoGBK struct {
    UID  exec.UnitID
    Edge *graph.MultiEdge
    Out  exec.Node
    // contains filtered or unexported fields
}

CoGBK buffers all input and continues on FinishBundle. Use with small single-bundle data only.

func (*CoGBK) Down Uses

func (n *CoGBK) Down(ctx context.Context) error

func (*CoGBK) FinishBundle Uses

func (n *CoGBK) FinishBundle(ctx context.Context) error

func (*CoGBK) ID Uses

func (n *CoGBK) ID() exec.UnitID

func (*CoGBK) ProcessElement Uses

func (n *CoGBK) ProcessElement(ctx context.Context, elm *exec.FullValue, _ ...exec.ReStream) error

func (*CoGBK) StartBundle Uses

func (n *CoGBK) StartBundle(ctx context.Context, id string, data exec.DataContext) error

func (*CoGBK) String Uses

func (n *CoGBK) String() string

func (*CoGBK) Up Uses

func (n *CoGBK) Up(ctx context.Context) error

type Impulse Uses

type Impulse struct {
    UID   exec.UnitID
    Value []byte
    Out   exec.Node
}

Impulse emits its single element in one invocation.

func (*Impulse) Down Uses

func (n *Impulse) Down(ctx context.Context) error

func (*Impulse) FinishBundle Uses

func (n *Impulse) FinishBundle(ctx context.Context) error

func (*Impulse) ID Uses

func (n *Impulse) ID() exec.UnitID

func (*Impulse) Process Uses

func (n *Impulse) Process(ctx context.Context) error

func (*Impulse) StartBundle Uses

func (n *Impulse) StartBundle(ctx context.Context, id string, data exec.DataContext) error

func (*Impulse) String Uses

func (n *Impulse) String() string

func (*Impulse) Up Uses

func (n *Impulse) Up(ctx context.Context) error

type Inject Uses

type Inject struct {
    UID exec.UnitID
    N   int
    Out exec.Node
}

Inject injects the predecessor index into each FullValue, effectively converting KV<X,Y> into KV<X,KV<int,Y>>. Used to prime CoGBK.

func (*Inject) Down Uses

func (n *Inject) Down(ctx context.Context) error

func (*Inject) FinishBundle Uses

func (n *Inject) FinishBundle(ctx context.Context) error

func (*Inject) ID Uses

func (n *Inject) ID() exec.UnitID

func (*Inject) ProcessElement Uses

func (n *Inject) ProcessElement(ctx context.Context, elm *exec.FullValue, values ...exec.ReStream) error

func (*Inject) StartBundle Uses

func (n *Inject) StartBundle(ctx context.Context, id string, data exec.DataContext) error

func (*Inject) String Uses

func (n *Inject) String() string

func (*Inject) Up Uses

func (n *Inject) Up(ctx context.Context) error

Package direct imports 15 packages (graph) and is imported by 4 packages. Updated 2020-05-17. Refresh now. Tools for package owners.