TengHu commented on a change in pull request #12297:
URL: https://github.com/apache/flink/pull/12297#discussion_r439016010
##########
File path:
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/windowing/assigners/TumblingProcessingTimeWindows.java
##########
@@ -107,7 +123,22 @@ public static TumblingProcessingTimeWindows of(Time size) {
* @return The time policy.
*/
public static TumblingProcessingTimeWindows of(Time size, Time offset) {
- return new TumblingProcessingTimeWindows(size.toMilliseconds(),
offset.toMilliseconds());
+ return new TumblingProcessingTimeWindows(size.toMilliseconds(),
offset.toMilliseconds(), WindowStagger.ALIGNED);
+ }
+
+ /**
+ * Creates a new {@code TumblingProcessingTimeWindows} {@link
WindowAssigner} that assigns
+ * elements to time windows based on the element timestamp, offset and
a staggering offset sampled
+ * from uniform distribution(0, window size) for each pane.
+ *
+ * @param size The size of the generated windows.
+ * @param offset The offset which window start would be shifted by.
+ * @param windowStagger The utility that produces staggering offset in
runtime.
+ *
+ * @return The time policy.
+ */
+ public static TumblingProcessingTimeWindows of(Time size, Time offset,
WindowStagger windowStagger) throws Exception {
Review comment:
Removed
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]