| Constructor and Description |
|---|
WindowFnTestUtils() |
| Modifier and Type | Method and Description |
|---|---|
static <T,W extends BoundedWindow> |
assignedWindows(WindowFn<T,W> windowFn,
long timestamp) |
static <T,W extends BoundedWindow> |
runWindowFn(WindowFn<T,W> windowFn,
List<Long> timestamps)
Runs the
WindowFn over the provided input, returning a map
of windows to the timestamps in those windows. |
static Set<String> |
set(long... timestamps)
Creates a Set of elements to be used as expected output in
runWindowFn(com.google.cloud.dataflow.sdk.transforms.windowing.WindowFn<T, W>, java.util.List<java.lang.Long>). |
static <T,W extends BoundedWindow> |
validateGetOutputTimestamp(WindowFn<T,W> windowFn,
long timestamp)
Assigns the given
timestamp to windows using the specified windowFn, and
verifies that result of windowFn.getOutputTimestamp for later windows (as defined by
maxTimestamp won't prevent the watermark from passing the end of earlier windows. |
static <T,W extends BoundedWindow> |
validateNonInterferingOutputTimes(WindowFn<T,W> windowFn,
long timestamp)
Assigns the given
timestamp to windows using the specified windowFn, and
verifies that result of windowFn.getOutputTimestamp for each window is within the
proper bound. |
public static Set<String> set(long... timestamps)
runWindowFn(com.google.cloud.dataflow.sdk.transforms.windowing.WindowFn<T, W>, java.util.List<java.lang.Long>).public static <T,W extends BoundedWindow> Map<W,Set<String>> runWindowFn(WindowFn<T,W> windowFn, List<Long> timestamps) throws Exception
WindowFn over the provided input, returning a map
of windows to the timestamps in those windows.Exceptionpublic static <T,W extends BoundedWindow> Collection<W> assignedWindows(WindowFn<T,W> windowFn, long timestamp) throws Exception
Exceptionpublic static <T,W extends BoundedWindow> void validateNonInterferingOutputTimes(WindowFn<T,W> windowFn, long timestamp) throws Exception
timestamp to windows using the specified windowFn, and
verifies that result of windowFn.getOutputTimestamp for each window is within the
proper bound.Exceptionpublic static <T,W extends BoundedWindow> void validateGetOutputTimestamp(WindowFn<T,W> windowFn, long timestamp) throws Exception
timestamp to windows using the specified windowFn, and
verifies that result of windowFn.getOutputTimestamp for later windows (as defined by
maxTimestamp won't prevent the watermark from passing the end of earlier windows.
This verifies that overlapping windows don't interfere at all. Depending on the
windowFn this may be stricter than desired.
Exception