Google Cloud Dataflow SDK for Java, version 1.9.1
com.google.cloud.dataflow.sdk.transforms.windowing
Class PartitioningWindowFn<T,W extends BoundedWindow>
- java.lang.Object
-
- com.google.cloud.dataflow.sdk.transforms.windowing.WindowFn<T,W>
-
- com.google.cloud.dataflow.sdk.transforms.windowing.NonMergingWindowFn<T,W>
-
- com.google.cloud.dataflow.sdk.transforms.windowing.PartitioningWindowFn<T,W>
-
- Type Parameters:
T
- type of elements being windowedW
- window type
- All Implemented Interfaces:
- HasDisplayData, Serializable
- Direct Known Subclasses:
- CalendarWindows.DaysWindows, CalendarWindows.MonthsWindows, CalendarWindows.YearsWindows, FixedWindows
public abstract class PartitioningWindowFn<T,W extends BoundedWindow> extends NonMergingWindowFn<T,W>
AWindowFn
that places each value into exactly one window based on its timestamp and never merges windows.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.cloud.dataflow.sdk.transforms.windowing.WindowFn
WindowFn.AssignContext, WindowFn.MergeContext
-
-
Constructor Summary
Constructors Constructor and Description PartitioningWindowFn()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description boolean
assignsToSingleWindow()
Returns true if thisWindowFn
assigns each element to a single window.abstract W
assignWindow(Instant timestamp)
Returns the single window to which elements with this timestamp belong.Collection<W>
assignWindows(WindowFn.AssignContext c)
Given a timestamp and element, returns the set of windows into which it should be placed.Instant
getOutputTime(Instant inputTimestamp, W window)
W
getSideInputWindow(BoundedWindow window)
Returns the window of the side input corresponding to the given window of the main input.-
Methods inherited from class com.google.cloud.dataflow.sdk.transforms.windowing.NonMergingWindowFn
isNonMerging, mergeWindows
-
Methods inherited from class com.google.cloud.dataflow.sdk.transforms.windowing.WindowFn
getOutputTimeFn, isCompatible, populateDisplayData, windowCoder
-
-
-
-
Method Detail
-
assignWindow
public abstract W assignWindow(Instant timestamp)
Returns the single window to which elements with this timestamp belong.
-
assignWindows
public final Collection<W> assignWindows(WindowFn.AssignContext c)
Description copied from class:WindowFn
Given a timestamp and element, returns the set of windows into which it should be placed.- Specified by:
assignWindows
in classWindowFn<T,W extends BoundedWindow>
-
getSideInputWindow
public W getSideInputWindow(BoundedWindow window)
Description copied from class:WindowFn
Returns the window of the side input corresponding to the given window of the main input.Authors of custom
WindowFn
s should override this.- Specified by:
getSideInputWindow
in classWindowFn<T,W extends BoundedWindow>
-
assignsToSingleWindow
public boolean assignsToSingleWindow()
Description copied from class:WindowFn
Returns true if thisWindowFn
assigns each element to a single window.- Overrides:
assignsToSingleWindow
in classWindowFn<T,W extends BoundedWindow>
-
getOutputTime
public Instant getOutputTime(Instant inputTimestamp, W window)
- Overrides:
getOutputTime
in classWindowFn<T,W extends BoundedWindow>
-
-