[FLINK-6536] [cep] Improve error message in SharedBuffer::put().
Project: http://git-wip-us.apache.org/repos/asf/flink/repo Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/4f14e53b Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/4f14e53b Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/4f14e53b Branch: refs/heads/release-1.3 Commit: 4f14e53b877eab204d4d970d29f886d8fcc0034b Parents: fa64a60 Author: kl0u <kklou...@gmail.com> Authored: Thu May 11 11:39:00 2017 +0200 Committer: kkloudas <kklou...@gmail.com> Committed: Wed May 17 14:40:24 2017 +0200 ---------------------------------------------------------------------- .../src/main/java/org/apache/flink/cep/nfa/SharedBuffer.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flink/blob/4f14e53b/flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/SharedBuffer.java ---------------------------------------------------------------------- diff --git a/flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/SharedBuffer.java b/flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/SharedBuffer.java index 418bd4a..decf577 100644 --- a/flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/SharedBuffer.java +++ b/flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/SharedBuffer.java @@ -97,10 +97,11 @@ public class SharedBuffer<K extends Serializable, V> implements Serializable { // sanity check whether we've found the previous element if (previousSharedBufferEntry == null && previousValue != null) { - throw new IllegalStateException("Could not find previous shared buffer entry with " + + throw new IllegalStateException("Could not find previous entry with " + "key: " + previousKey + ", value: " + previousValue + " and timestamp: " + - previousTimestamp + ". This can indicate that the element belonging to the previous " + - "relation has been already pruned, even though you expect it to be still there."); + previousTimestamp + ". This can indicate that either you did not implement " + + "the equals() and hashCode() methods of your input elements properly or that " + + "the element belonging to that entry has been already pruned."); } put(key, value, timestamp, previousSharedBufferEntry, version);