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

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

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

    https://github.com/apache/flink/pull/6234#discussion_r199365531
  
    --- Diff: 
flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/NFA.java ---
    @@ -224,23 +226,26 @@ private boolean isFinalState(ComputationState state) {
     
        /**
         * Prunes states assuming there will be no events with timestamp 
<b>lower</b> than the given one.
    -    * It cleares the sharedBuffer and also emits all timed out partial 
matches.
    +    * It clears the sharedBuffer and also emits all timed out partial 
matches.
         *
         * @param sharedBuffer the SharedBuffer object that we need to work 
upon while processing
         * @param nfaState     The NFAState object that we need to affect while 
processing
         * @param timestamp    timestamp that indicates that there will be no 
more events with lower timestamp
         * @return all timed outed partial matches
         * @throws Exception Thrown if the system cannot access the state.
         */
    -   public Collection<Tuple2<Map<String, List<T>>, Long>> advanceTime(
    +   public Tuple2<Collection<Tuple2<Map<String, List<T>>, Long>>, 
Collection<Map<String, List<T>>>> advanceTime(
                        final SharedBuffer<T> sharedBuffer,
                        final NFAState nfaState,
    -                   final long timestamp) throws Exception {
    +                   final long timestamp,
    +                   final AfterMatchSkipStrategy afterMatchSkipStrategy) 
throws Exception {
    --- End diff --
    
    please add parameter explication for new parameter `afterMatchSkipStrategy 
` of the method. 


> Introduce TimeEnd State to flink cep
> ------------------------------------
>
>                 Key: FLINK-9431
>                 URL: https://issues.apache.org/jira/browse/FLINK-9431
>             Project: Flink
>          Issue Type: Improvement
>          Components: CEP
>    Affects Versions: 1.4.2
>            Reporter: aitozi
>            Assignee: aitozi
>            Priority: Major
>              Labels: pull-request-available
>
> Now flink cep have no support to reach a Final State upon past some time. if 
> i use a pattern like 
> {code:java}Pattern.begin('A').notFollowedBy("B"){code}, if i want A element 
> be emitted after 5minutes, i have no way.
> I want to introduce a timeEnd State to work with notFollowedBy to figure out 
> with this scenior.
> It can be used like this 
> {code:java}Pattern.begin('A').notFollowedBy("B").timeEnd("end").{code},
> [~dawidwys] [~kkl0u] Is this meaningful?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to