forward

package
v1.4.0 Latest Latest
Warning

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

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

Documentation

Overview

Package forward is used for creating a data forwarder for the UDF vertex.

Package forward does the Read (fromBufferPartition) -> Process (map UDF) -> Forward (toBuffers) -> Ack (fromBufferPartition) loop.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultOptions

func DefaultOptions() *options

Types

type InterStepDataForward

type InterStepDataForward struct {
	Shutdown
	// contains filtered or unexported fields
}

InterStepDataForward forwards the data from previous step to the current step via inter-step buffer.

func NewInterStepDataForward

func NewInterStepDataForward(vertexInstance *dfv1.VertexInstance, fromStep isb.BufferReader, toSteps map[string][]isb.BufferWriter, fsd forwarder.ToWhichStepDecider, fetchWatermark fetch.Fetcher, publishWatermark map[string]publish.Publisher, idleManager wmb.IdleManager, opts ...Option) (*InterStepDataForward, error)

NewInterStepDataForward creates an inter-step forwarder.

func (*InterStepDataForward) ForceStop

func (isdf *InterStepDataForward) ForceStop()

ForceStop sets up the force shutdown flag.

func (*InterStepDataForward) IsShuttingDown

func (isdf *InterStepDataForward) IsShuttingDown() (bool, error)

IsShuttingDown returns whether we can stop processing.

func (*InterStepDataForward) Start

func (isdf *InterStepDataForward) Start() <-chan error

Start starts reading the buffer and forwards to the next buffers. Call `Stop` to stop.

func (*InterStepDataForward) Stop

func (isdf *InterStepDataForward) Stop()

Stop stops the processing.

type Option

type Option func(*options) error

func WithCallbackUploader added in v1.3.0

func WithCallbackUploader(cp *callback.Uploader) Option

WithCallbackUploader sets the callback uploader for the vertex

func WithLogger

func WithLogger(l *zap.SugaredLogger) Option

WithLogger is used to return logger information

func WithReadBatchSize

func WithReadBatchSize(f int64) Option

WithReadBatchSize sets the read batch size

func WithRetryInterval

func WithRetryInterval(f time.Duration) Option

WithRetryInterval sets the retry interval

func WithUDFConcurrency

func WithUDFConcurrency(f int) Option

WithUDFConcurrency sets concurrency for map UDF processing

func WithUDFMap added in v1.4.0

func WithUDFMap(f applier.MapApplier) Option

WithUDFMap enables the unary map for UDF if provided with a non-nil applier

func WithUDFStreamingMap added in v1.3.0

func WithUDFStreamingMap(f applier.MapStreamApplier) Option

WithUDFStreamingMap sets streaming for map UDF processing if provided with a non-nil applier

type Shutdown

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

Shutdown tracks and enforces the shutdown activity.

func (*Shutdown) String

func (s *Shutdown) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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