Documentation ¶
Overview ¶
Package forward is used for creating a data forwarder for the map 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 ¶ added in v0.7.3
func DefaultOptions() *options
Types ¶
type GoWhere ¶
type GoWhere func([]string, []string) ([]VertexBuffer, error)
GoWhere is the step decider on where it needs to go
type InterStepDataForward ¶
type InterStepDataForward struct { FSD ToWhichStepDecider 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 ToWhichStepDecider, applyUDF applier.MapApplier, applyUDFStream applier.MapStreamApplier, 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 struct{}
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 WithLogger ¶
func WithLogger(l *zap.SugaredLogger) Option
WithLogger is used to return logger information
func WithReadBatchSize ¶
WithReadBatchSize sets the read batch size
func WithRetryInterval ¶
WithRetryInterval sets the retry interval
func WithUDFConcurrency ¶
WithUDFConcurrency sets concurrency for map UDF processing
func WithUDFStreaming ¶ added in v0.8.1
WithUDFStreaming sets streaming for map UDF processing
type Shutdown ¶
type Shutdown struct {
// contains filtered or unexported fields
}
Shutdown tracks and enforces the shutdown activity.
type StarterStopper ¶
type StarterStopper interface { Start() <-chan struct{} Stop() ForceStop() }
StarterStopper starts/stops the forwarding.
type ToWhichStepDecider ¶
type ToWhichStepDecider interface { // WhereTo decides where to forward the result to based on the name of the step it returns. // It supports 2 addition keywords which need not be a step name. They are "ALL" and "DROP" // where former means, forward to all the neighbouring steps and latter means do not forward anywhere. WhereTo([]string, []string) ([]VertexBuffer, error) }
ToWhichStepDecider decides which step to forward after applying the WhereTo function.
type VertexBuffer ¶ added in v0.9.0
VertexBuffer points to the partition of a buffer owned by the vertex.