flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From srich...@apache.org
Subject flink git commit: [FLINK-6061] [state backends] Throw IllegalStateException when using RocksDB keyed state with no key set
Date Wed, 15 Mar 2017 14:28:29 GMT
Repository: flink
Updated Branches:
  refs/heads/master 0a501e9f7 -> 0bdc8bfd0


[FLINK-6061] [state backends] Throw IllegalStateException when using RocksDB keyed state with
no key set


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

Branch: refs/heads/master
Commit: 0bdc8bfd02b4eb6df46e3881df4a0c4d52ab4c58
Parents: 0a501e9
Author: Stefan Richter <s.richter@data-artisans.com>
Authored: Wed Mar 15 12:23:12 2017 +0100
Committer: Stefan Richter <s.richter@data-artisans.com>
Committed: Wed Mar 15 15:27:24 2017 +0100

----------------------------------------------------------------------
 .../apache/flink/contrib/streaming/state/AbstractRocksDBState.java | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/0bdc8bfd/flink-contrib/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/AbstractRocksDBState.java
----------------------------------------------------------------------
diff --git a/flink-contrib/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/AbstractRocksDBState.java
b/flink-contrib/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/AbstractRocksDBState.java
index 569971a..ba7fb28 100644
--- a/flink-contrib/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/AbstractRocksDBState.java
+++ b/flink-contrib/flink-statebackend-rocksdb/src/main/java/org/apache/flink/contrib/streaming/state/AbstractRocksDBState.java
@@ -158,6 +158,8 @@ public abstract class AbstractRocksDBState<K, N, S extends State, SD
extends Sta
 			ByteArrayOutputStreamWithPos keySerializationStream,
 			DataOutputView keySerializationDataOutputView) throws IOException {
 
+		Preconditions.checkNotNull(key, "No key set. This method should not be called outside of
a keyed context.");
+
 		keySerializationStream.reset();
 		writeKeyGroup(keyGroup, keySerializationDataOutputView);
 		writeKey(key, keySerializationStream, keySerializationDataOutputView);


Mime
View raw message