Documentation
¶
Overview ¶
Package fixed implements Fixed windows. Fixed windows (sometimes called tumbling windows) are defined by a static window size, e.g. minutely windows or hourly windows. They are generally aligned, i.e. every window applies across all the data for the corresponding period of time. Package fixed also maintains the state of active keyed windows in a vertex. Keyed Window maintains the association between set of keys and an interval window. keyed also provides the lifecycle management of an interval window. Watermark is used to trigger the expiration of windows.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActiveWindows ¶
type ActiveWindows struct {
// contains filtered or unexported fields
}
ActiveWindows maintains the state of active windows All the operations in ActiveWindows order the entries in the ascending order of start time. So the earliest window is at the front and the oldest window is at the end.
func (*ActiveWindows) CreateKeyedWindow ¶
func (aw *ActiveWindows) CreateKeyedWindow(iw *window.IntervalWindow) *keyed.KeyedWindow
CreateKeyedWindow adds a new keyed window for a given interval window
func (*ActiveWindows) GetKeyedWindow ¶
func (aw *ActiveWindows) GetKeyedWindow(iw *window.IntervalWindow) *keyed.KeyedWindow
GetKeyedWindow returns an existing window for the given interval
func (*ActiveWindows) RemoveWindow ¶
func (aw *ActiveWindows) RemoveWindow(wm time.Time) []*keyed.KeyedWindow
RemoveWindow returns an array of keyed windows that are before the current watermark. So these windows can be closed.
type Fixed ¶
Fixed implements Fixed window.
func (*Fixed) AssignWindow ¶
func (f *Fixed) AssignWindow(eventTime time.Time) []*window.IntervalWindow
AssignWindow assigns a window for the given eventTime.