Re: Java 8 lambdas for CEP patterns won't compile

2017-07-06 Thread David Koch
Thank you! Hoping to see Lambda support added back in soon as well.

Regards,

David

On Mon, Jun 12, 2017 at 1:57 PM, Kostas Kloudas  wrote:

> Done.
>
> On Jun 12, 2017, at 12:24 PM, Ted Yu  wrote:
>
> Can you add link to this thread in the JIRA ?
>
> Cheers
>
> On Mon, Jun 12, 2017 at 3:15 AM, Kostas Kloudas <
> k.klou...@data-artisans.com> wrote:
>
>> Unfortunately, there was no discussion as this regression came as an
>> artifact of the addition of the IterativeConditions, but it will be fixed.
>>
>> This is the JIRA to track it:
>> https://issues.apache.org/jira/browse/FLINK-6897
>>
>> Kostas
>>
>> On Jun 12, 2017, at 11:51 AM, Ted Yu  wrote:
>>
>> Do know which JIRA / discussion thread had the context for this decision ?
>>
>> I did a quick search in JIRA but only found FLINK-3681.
>>
>> Cheers
>>
>> On Mon, Jun 12, 2017 at 1:48 AM, Kostas Kloudas <
>> k.klou...@data-artisans.com> wrote:
>>
>>> Hi David and Ted,
>>>
>>> The documentation is outdated. I will update it today.
>>> Java8 Lambdas are NOT supported by CEP in Flink 1.3.
>>>
>>> Hopefully this will change soon. I will open a JIRA for this.
>>>
>>> Cheers,
>>> Kostas
>>>
>>> On Jun 11, 2017, at 11:55 PM, Ted Yu  wrote:
>>>
>>>
>>>
>>>
>>>
>>
>>
>
>


Re: Java 8 lambdas for CEP patterns won't compile

2017-06-12 Thread Kostas Kloudas
Done.

> On Jun 12, 2017, at 12:24 PM, Ted Yu  wrote:
> 
> Can you add link to this thread in the JIRA ?
> 
> Cheers
> 
> On Mon, Jun 12, 2017 at 3:15 AM, Kostas Kloudas  > wrote:
> Unfortunately, there was no discussion as this regression came as an 
> artifact of the addition of the IterativeConditions, but it will be fixed.
> 
> This is the JIRA to track it:
> https://issues.apache.org/jira/browse/FLINK-6897 
> 
> 
> Kostas
> 
>> On Jun 12, 2017, at 11:51 AM, Ted Yu > > wrote:
>> 
>> Do know which JIRA / discussion thread had the context for this decision ?
>> 
>> I did a quick search in JIRA but only found FLINK-3681.
>> 
>> Cheers
>> 
>> On Mon, Jun 12, 2017 at 1:48 AM, Kostas Kloudas > > wrote:
>> Hi David and Ted,
>> 
>> The documentation is outdated. I will update it today.
>> Java8 Lambdas are NOT supported by CEP in Flink 1.3.
>> 
>> Hopefully this will change soon. I will open a JIRA for this.
>> 
>> Cheers,
>> Kostas
>> 
>>> On Jun 11, 2017, at 11:55 PM, Ted Yu >> > wrote:
>>> 
>>>  
>> 
>> 
> 
> 



Re: Java 8 lambdas for CEP patterns won't compile

2017-06-12 Thread Ted Yu
Can you add link to this thread in the JIRA ?

Cheers

On Mon, Jun 12, 2017 at 3:15 AM, Kostas Kloudas  wrote:

> Unfortunately, there was no discussion as this regression came as an
> artifact of the addition of the IterativeConditions, but it will be fixed.
>
> This is the JIRA to track it:
> https://issues.apache.org/jira/browse/FLINK-6897
>
> Kostas
>
> On Jun 12, 2017, at 11:51 AM, Ted Yu  wrote:
>
> Do know which JIRA / discussion thread had the context for this decision ?
>
> I did a quick search in JIRA but only found FLINK-3681.
>
> Cheers
>
> On Mon, Jun 12, 2017 at 1:48 AM, Kostas Kloudas <
> k.klou...@data-artisans.com> wrote:
>
>> Hi David and Ted,
>>
>> The documentation is outdated. I will update it today.
>> Java8 Lambdas are NOT supported by CEP in Flink 1.3.
>>
>> Hopefully this will change soon. I will open a JIRA for this.
>>
>> Cheers,
>> Kostas
>>
>> On Jun 11, 2017, at 11:55 PM, Ted Yu  wrote:
>>
>>
>>
>>
>>
>
>


Re: Java 8 lambdas for CEP patterns won't compile

2017-06-12 Thread Ted Yu
Do know which JIRA / discussion thread had the context for this decision ?

I did a quick search in JIRA but only found FLINK-3681.

Cheers

On Mon, Jun 12, 2017 at 1:48 AM, Kostas Kloudas  wrote:

> Hi David and Ted,
>
> The documentation is outdated. I will update it today.
> Java8 Lambdas are NOT supported by CEP in Flink 1.3.
>
> Hopefully this will change soon. I will open a JIRA for this.
>
> Cheers,
> Kostas
>
> On Jun 11, 2017, at 11:55 PM, Ted Yu  wrote:
>
>
>
>
>


Re: Java 8 lambdas for CEP patterns won't compile

2017-06-11 Thread Ted Yu
Looking at docs/dev/libs/cep.md , there're 3 examples using lambda.
Here is one:

Pattern pattern = Pattern.begin("start").where(evt -> evt.getId()
== 42)

Your syntax should be supported.
I haven't found such example in test code, though.

FYI

On Sun, Jun 11, 2017 at 2:42 PM, David Koch  wrote:

> Hello,
>
> I cannot get patterns expressed as lambdas like:
>
> Pattern pattern1 = Pattern. begin("start")
> .where(evt -> evt.key.length() > 0)
> .next("last").where(evt -> evt.key.length() >
> 0).within(Time.seconds(5));
>
> to compile with Flink 1.3.0. My IDE doesn't handle it and building on
> command line with maven does not work either. The exception given by a
> maven build in command line is:
>
> [ERROR] The method where(IterativeCondition) in the type
> Pattern is not applicable for the arguments (( evt)
> -> {})
> [ERROR] /Users//xxx/cep-test/src/main/java/com///
> CEPTest.java:[83]
> [ERROR] .where(evt -> evt.key.length() > 0)
> [ERROR] ^^^
> [ERROR] The target type of this expression must be a functional interface
>
> I used the standard pom.xml generated by the Flink quick start archetype.
> If I recall correctly this is something that used to work with Flink
> 1.2.0-SNAPSHOT back when I tested CEP for the first time.
>
> Any idea why this could be the case or maybe my syntax is not correct? I
> include my maven information below.
>
> Thank you,
>
> David
>
>
> Davids-MacBook-Pro-2:cep-test dkoch$ mvn -v
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5;
> 2015-11-10T17:41:47+01:00)
> Maven home: /usr/local/Cellar/maven/3.3.9/libexec
> Java version: 1.8.0_102, vendor: Oracle Corporation
> Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_
> 102.jdk/Contents/Home/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "mac os x", version: "10.11.6", arch: "x86_64", family: "mac"
>