Google Cloud Dataflow SDK for Java, version 1.9.1
com.google.cloud.dataflow.sdk.transforms.windowing
Class InvalidWindows<W extends BoundedWindow>
- java.lang.Object
-
- com.google.cloud.dataflow.sdk.transforms.windowing.WindowFn<Object,W>
-
- com.google.cloud.dataflow.sdk.transforms.windowing.InvalidWindows<W>
-
- Type Parameters:
W
- window type
- All Implemented Interfaces:
- HasDisplayData, Serializable
public class InvalidWindows<W extends BoundedWindow> extends WindowFn<Object,W>
AWindowFn
that represents an invalid pipeline state.- 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 InvalidWindows(String cause, WindowFn<?,W> originalWindowFn)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description Collection<W>
assignWindows(WindowFn.AssignContext c)
Given a timestamp and element, returns the set of windows into which it should be placed.String
getCause()
Returns the reason that thisWindowFn
is invalid.WindowFn<?,W>
getOriginalWindowFn()
Returns the original windowFn that this InvalidWindows replaced.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.boolean
isCompatible(WindowFn<?,?> other)
InvalidWindows
objects with the sameoriginalWindowFn
are compatible.void
mergeWindows(WindowFn.MergeContext c)
Does whatever merging of windows is necessary.Coder<W>
windowCoder()
Returns theCoder
used for serializing the windows used by this windowFn.-
Methods inherited from class com.google.cloud.dataflow.sdk.transforms.windowing.WindowFn
assignsToSingleWindow, getOutputTimeFn, isNonMerging, populateDisplayData
-
-
-
-
Method Detail
-
getCause
public String getCause()
Returns the reason that thisWindowFn
is invalid.
-
getOriginalWindowFn
public WindowFn<?,W> getOriginalWindowFn()
Returns the original windowFn that this InvalidWindows replaced.
-
assignWindows
public 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<Object,W extends BoundedWindow>
-
mergeWindows
public void mergeWindows(WindowFn.MergeContext c)
Description copied from class:WindowFn
Does whatever merging of windows is necessary.See
MergeOverlappingIntervalWindows.mergeWindows(com.google.cloud.dataflow.sdk.transforms.windowing.WindowFn<?, com.google.cloud.dataflow.sdk.transforms.windowing.IntervalWindow>.MergeContext)
for an example of how to override this method.- Specified by:
mergeWindows
in classWindowFn<Object,W extends BoundedWindow>
-
windowCoder
public Coder<W> windowCoder()
Description copied from class:WindowFn
Returns theCoder
used for serializing the windows used by this windowFn.- Specified by:
windowCoder
in classWindowFn<Object,W extends BoundedWindow>
-
isCompatible
public boolean isCompatible(WindowFn<?,?> other)
InvalidWindows
objects with the sameoriginalWindowFn
are compatible.- Specified by:
isCompatible
in classWindowFn<Object,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<Object,W extends BoundedWindow>
-
getOutputTime
public Instant getOutputTime(Instant inputTimestamp, W window)
- Overrides:
getOutputTime
in classWindowFn<Object,W extends BoundedWindow>
-
-