[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/02ea418f Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/02ea418f Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/02ea418f Branch: refs/heads/master Commit: 02ea418fb307876e1b957cad6be619a4d035d829 Parents: ae9c9d0 Author: kl0u <kklou...@gmail.com> Authored: Thu May 11 11:39:00 2017 +0200 Committer: kkloudas <kklou...@gmail.com> Committed: Wed May 17 14:37:32 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/02ea418f/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);