flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aljos...@apache.org
Subject [3/6] flink git commit: [hotfix] Add Check for Keyed Operator in getInternalTimerService()
Date Mon, 07 Nov 2016 15:26:31 GMT
[hotfix] Add Check for Keyed Operator in getInternalTimerService()


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

Branch: refs/heads/master
Commit: 132d8f146c111ca7acf890fc2e2950e4931b2c7b
Parents: 718f6e4
Author: Aljoscha Krettek <aljoscha.krettek@gmail.com>
Authored: Mon Nov 7 11:52:38 2016 +0100
Committer: Aljoscha Krettek <aljoscha.krettek@gmail.com>
Committed: Mon Nov 7 16:25:57 2016 +0100

----------------------------------------------------------------------
 .../flink/streaming/api/operators/AbstractStreamOperator.java     | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/132d8f14/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/AbstractStreamOperator.java
----------------------------------------------------------------------
diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/AbstractStreamOperator.java
b/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/AbstractStreamOperator.java
index a659866..7b555b7 100644
--- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/AbstractStreamOperator.java
+++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/AbstractStreamOperator.java
@@ -784,6 +784,9 @@ public abstract class AbstractStreamOperator<OUT>
 			TypeSerializer<K> keySerializer,
 			TypeSerializer<N> namespaceSerializer,
 			Triggerable<K, N> triggerable) {
+		if (getKeyedStateBackend() == null) {
+			throw new UnsupportedOperationException("Timers can only be used on keyed operators.");
+		}
 
 		@SuppressWarnings("unchecked")
 		HeapInternalTimerService<K, N> timerService = (HeapInternalTimerService<K, N>)
timerServices.get(name);


Mime
View raw message