flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-6897) Re-add support for Java 8 lambdas in CEP library
Date Fri, 23 Jun 2017 10:55:00 GMT

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

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

Github user kl0u commented on the issue:

    https://github.com/apache/flink/pull/4165
  
    Hi @dawidwys ! 
    
    This branch seems to be broken (does not compile). In the `Pattern` class, the newly introduced:
    `public Pattern<T, F> where(SimpleCondition<F> condition) ` and `public Pattern<T,
F> or(SimpleCondition<F> condition)` should declare their arguments as `final`. 
    
    And even if you fix this, then the `NFATest`s are broken because the `IterativeCondition`
is not serializable:
    
    ```
    org.apache.flink.api.common.InvalidProgramException: The implementation of the IterativeCondition
is not serializable. The object probably contains or references non serializable fields.
    
    	at org.apache.flink.api.java.ClosureCleaner.clean(ClosureCleaner.java:100)
    	at org.apache.flink.cep.pattern.Pattern.where(Pattern.java:134)
    	at org.apache.flink.cep.pattern.Pattern.where(Pattern.java:154)
    	at org.apache.flink.cep.nfa.NFATest.testNFASerialization(NFATest.java:195)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:497)
    	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
    	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
    	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    	at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
    	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
    	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
    	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
    	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
    	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
    	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
    	at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:51)
    	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
    	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
    Caused by: java.io.NotSerializableException: org.apache.flink.cep.nfa.NFATest
    	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184)
    	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
    	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
    	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
    	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
    	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1548)
    	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1509)
    	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1432)
    	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
    	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
    	at org.apache.flink.util.InstantiationUtil.serializeObject(InstantiationUtil.java:315)
    	at org.apache.flink.api.java.ClosureCleaner.clean(ClosureCleaner.java:81)
    	... 27 more
    
    ```


> Re-add support for Java 8 lambdas in CEP library
> ------------------------------------------------
>
>                 Key: FLINK-6897
>                 URL: https://issues.apache.org/jira/browse/FLINK-6897
>             Project: Flink
>          Issue Type: Bug
>          Components: CEP
>    Affects Versions: 1.3.0
>            Reporter: Kostas Kloudas
>            Assignee: Dawid Wysakowicz
>
> Relevant  [mailing list thread|http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Java-8-lambdas-for-CEP-patterns-won-t-compile-td13626.html]



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message