Documentation ¶
Overview ¶
Package forward does the Read (fromBuffer) -> Process (UDF) -> Forward (toBuffers) -> Ack (fromBuffer) loop.
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type InterStepDataForward ¶
type InterStepDataForward struct { FSD ToWhichStepDecider UDF udfapplier.Applier 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(vertex *dfv1.Vertex, fromStep isb.BufferReader, toSteps map[string]isb.BufferWriter, fsd ToWhichStepDecider, applyUDF udfapplier.Applier, fetchWatermark fetch.Fetcher, publishWatermark map[string]publish.Publisher, 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 ste concurrency for UDF processing
func WithVertexType ¶ added in v0.6.1
func WithVertexType(t dfv1.VertexType) Option
WithVertexType sets the type of the vertex
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, error) }
ToWhichStepDecider decides which step to forward after applying the WhereTo function.