Class WindowFn.MergeContext
- java.lang.Object
-
- org.apache.beam.sdk.transforms.windowing.WindowFn.MergeContext
-
- Enclosing class:
- WindowFn<T,W extends BoundedWindow>
public abstract class WindowFn.MergeContext extends java.lang.Object
Information available when runningWindowFn.mergeWindows(org.apache.beam.sdk.transforms.windowing.WindowFn.MergeContext)
.
-
-
Constructor Summary
Constructors Constructor Description MergeContext()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract void
merge(java.util.Collection<W> toBeMerged, W mergeResult)
Signals to the framework that the windows intoBeMerged
should be merged together to formmergeResult
.abstract java.util.Collection<W>
windows()
Returns the current set of windows.
-
-
-
Method Detail
-
windows
public abstract java.util.Collection<W> windows()
Returns the current set of windows.
-
merge
public abstract void merge(java.util.Collection<W> toBeMerged, W mergeResult) throws java.lang.Exception
Signals to the framework that the windows intoBeMerged
should be merged together to formmergeResult
.toBeMerged
should be a subset ofwindows()
and disjoint from thetoBeMerged
set of previous calls tomerge
.mergeResult
must either not be inwindows()
or be intoBeMerged
.- Throws:
java.lang.IllegalArgumentException
- if any elements of toBeMerged are not in windows(), or have already been mergedjava.lang.Exception
-
-