-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Session Window and Reduce Streaming #1384
Conversation
Signed-off-by: Yashash H L <[email protected]>
Signed-off-by: Yashash H L <[email protected]>
Signed-off-by: Yashash H L <[email protected]>
Signed-off-by: Yashash H L <[email protected]>
Signed-off-by: Yashash H L <[email protected]>
Signed-off-by: Yashash H L <[email protected]>
Signed-off-by: Yashash H L <[email protected]>
Signed-off-by: Yashash H L <[email protected]>
Signed-off-by: Yashash H L <[email protected]>
Signed-off-by: Yashash H L <[email protected]>
Signed-off-by: Yashash H L <[email protected]>
Signed-off-by: Yashash H L <[email protected]>
Signed-off-by: Yashash H L <[email protected]>
Signed-off-by: Yashash H L <[email protected]>
Signed-off-by: Yashash H L <[email protected]>
Signed-off-by: Yashash H L <[email protected]>
Signed-off-by: Yashash H L <[email protected]>
Signed-off-by: Yashash H L <[email protected]>
Signed-off-by: Yashash H L <[email protected]>
Signed-off-by: Yashash H L <[email protected]>
Signed-off-by: Yashash H L <[email protected]>
Signed-off-by: Vigith Maurice <[email protected]>
Signed-off-by: Yashash H L <[email protected]>
Signed-off-by: Vigith Maurice <[email protected]>
Signed-off-by: Yashash H L <[email protected]>
Signed-off-by: Yashash H L <[email protected]>
Signed-off-by: Yashash H L <[email protected]>
Signed-off-by: Yashash H L <[email protected]>
Signed-off-by: Yashash H L <[email protected]>
Signed-off-by: Yashash H L <[email protected]>
Signed-off-by: Yashash H L <[email protected]>
Signed-off-by: Yashash H L <[email protected]>
Signed-off-by: Yashash H L <[email protected]>
Signed-off-by: Yashash H L <[email protected]>
Signed-off-by: Yashash H L <[email protected]>
pkg/apis/numaflow/v1alpha1/udf.go
Outdated
} | ||
|
||
// FixedWindow describes a fixed window | ||
type FixedWindow struct { | ||
Length *metav1.Duration `json:"length,omitempty" protobuf:"bytes,1,opt,name=length"` | ||
// +optional | ||
Streaming bool `json:"streaming,omitempty" protobuf:"bytes,3,opt,name=streaming"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong index.
Doc please.
} | ||
|
||
// SlidingWindow describes a sliding window | ||
type SlidingWindow struct { | ||
Length *metav1.Duration `json:"length,omitempty" protobuf:"bytes,1,opt,name=length"` | ||
Slide *metav1.Duration `json:"slide,omitempty" protobuf:"bytes,2,opt,name=slide"` | ||
// +optional |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doc.
return w.keys | ||
} | ||
|
||
func (w *sessionWindow) Partition() *partition.ID { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Partition returns the partition id of the window
// which will be used to map to the pbq instance.
Partition() *partition.ID
Should we use SharedSessionPartition
here for the session window? Since it's used for identifying the PBQ.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
both are a little different, I will update and fix the comments to avoid confusion.
Signed-off-by: Yashash H L <[email protected]>
Signed-off-by: Yashash H L <[email protected]>
Signed-off-by: Yashash H L <[email protected]>
Signed-off-by: Yashash H L <[email protected]>
Controller changes to support session reduce, introduced a new object under groupBy called
"session"
, which takes a"timeout"
field.Supporting streaming reduce, by making the
ReduceApplier
asynchronous and theApplyReduce
function now returns a channel of responses and errors, enabling immediate forwarding results to ISB upon receiving SDK responses.Windower
interfaces have been updated to support session reduce and streaming reduce, IntroducedTimedWindower
,TimedWindow
,TimedWindowRequest
andTimedWindowResponse
for easier window operations such as create, delete, expand, merge and close, along with aSortedWindowByEndTime
data structure for better window tracking in windower.PBQ
signatures have been updated to acceptTimedWindowRequests
, in line withReduceApplier
now takingTimedWindowRequests
and returningTimedWindowResponses
.PnF has been updated to support async and session reduce, and it takes care of publishing monotonically increasing watermarks.
Tracking of closed windows previously in the
PBQManager
has been moved to the windower, suiting multiple windows in a session sharing a common PBQ. Now,DataForward
andPnF
will use the windower for all window-related operations.