You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by al...@apache.org on 2017/05/04 10:45:02 UTC

[2/2] flink git commit: [hotfix] Add check for aligned assigner in AllWindowedStream.evictor()

[hotfix] Add check for aligned assigner in AllWindowedStream.evictor()

This check is present in WindowedStream but was missing on
AllWindowedStream.


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/8a470046
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/8a470046
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/8a470046

Branch: refs/heads/master
Commit: 8a470046a57113ba41bfc2a07f98f487f9feb0e0
Parents: c969237
Author: Aljoscha Krettek <al...@gmail.com>
Authored: Wed May 3 15:16:07 2017 +0200
Committer: Aljoscha Krettek <al...@gmail.com>
Committed: Thu May 4 12:43:56 2017 +0200

----------------------------------------------------------------------
 .../flink/streaming/api/datastream/AllWindowedStream.java       | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/8a470046/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/AllWindowedStream.java
----------------------------------------------------------------------
diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/AllWindowedStream.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/AllWindowedStream.java
index 2400330..772e635 100644
--- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/AllWindowedStream.java
+++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/datastream/AllWindowedStream.java
@@ -50,6 +50,7 @@ import org.apache.flink.streaming.api.functions.windowing.ProcessAllWindowFuncti
 import org.apache.flink.streaming.api.functions.windowing.ReduceApplyAllWindowFunction;
 import org.apache.flink.streaming.api.functions.windowing.ReduceApplyProcessAllWindowFunction;
 import org.apache.flink.streaming.api.operators.OneInputStreamOperator;
+import org.apache.flink.streaming.api.windowing.assigners.BaseAlignedWindowAssigner;
 import org.apache.flink.streaming.api.windowing.assigners.MergingWindowAssigner;
 import org.apache.flink.streaming.api.windowing.assigners.WindowAssigner;
 import org.apache.flink.streaming.api.windowing.evictors.Evictor;
@@ -178,6 +179,10 @@ public class AllWindowedStream<T, W extends Window> {
 			throw new UnsupportedOperationException("Cannot use a merging WindowAssigner with an Evictor.");
 		}
 
+		if (windowAssigner instanceof BaseAlignedWindowAssigner) {
+			throw new UnsupportedOperationException("Cannot use a " + windowAssigner.getClass().getSimpleName() + " with an Evictor.");
+		}
+
 		this.evictor = evictor;
 		return this;
 	}