[ 
https://issues.apache.org/jira/browse/FLINK-6536?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16010205#comment-16010205
 ] 

ASF GitHub Bot commented on FLINK-6536:
---------------------------------------

Github user dawidwys commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3872#discussion_r116444058
  
    --- Diff: 
flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/SharedBuffer.java
 ---
    @@ -96,10 +96,11 @@ public void put(
     
                // 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.");
    --- End diff --
    
    Been thinking about this exception message and those two reasons for the 
exception come from "two different worlds". 
    
    1. if element has been pruned - from user perspective this means some error 
in CEP library occured and the user can not do much about it.
    2. the equals() and hashCode() are obvious user mistakes.
    
    Not sure if we should do sth with it, but just wanted to express my 
thoughts on it.



> Improve error message in SharedBuffer::put()
> --------------------------------------------
>
>                 Key: FLINK-6536
>                 URL: https://issues.apache.org/jira/browse/FLINK-6536
>             Project: Flink
>          Issue Type: Bug
>          Components: CEP
>    Affects Versions: 1.2.0
>            Reporter: Kostas Kloudas
>            Assignee: Kostas Kloudas
>            Priority: Minor
>             Fix For: 1.3.0
>
>




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to