Github user aljoscha commented on a diff in the pull request:
https://github.com/apache/flink/pull/2355#discussion_r75305677
--- Diff:
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/windowing/assigners/SlidingEventTimeWindows.java
---
@@ -52,16 +52,19 @@
private final long slide;
- protected SlidingEventTimeWindows(long size, long slide) {
+ private final long offset;
+
+ protected SlidingEventTimeWindows(long size, long slide,long offset) {
this.size = size;
this.slide = slide;
+ this.offset = offset;
}
@Override
public Collection<TimeWindow> assignWindows(Object element, long
timestamp, WindowAssignerContext context) {
if (timestamp > Long.MIN_VALUE) {
List<TimeWindow> windows = new ArrayList<>((int) (size
/ slide));
- long lastStart = timestamp - timestamp % slide;
+ long lastStart =
TimeWindow.getWindowStartWithOffset(timestamp,offset,slide);
--- End diff --
Missing spaces after comma.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---