You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by shishal <sh...@gmail.com> on 2018/03/20 14:44:33 UTC

Flink CEP window for 1 working day

I am using flink CEP , and to match a event pattern in given time window we
use *.within(Time.days(1))*

Now in one of the case I need to wait for 1 working day instead of 1 day. Is
there any way to do that in Flink CEP?



--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/

Re: Flink CEP window for 1 working day

Posted by Fabian Hueske <fh...@gmail.com>.
Hi,

I don't think the CEP library is that flexible, but I loop in Kostas (CC)
who knows more about it.

I'm not exactly sure what you mean by "manipulate" event-time, but I don't
think that's necessary.
You can implement rules also with state and timers in the ProcessFunction.
The function ingests events and evaluates the rules.
To account for out of order data, you can process when a timer fires which
happens when the watermark advanced to that point in time.

Best, Fabian

2018-03-20 16:11 GMT+01:00 shishal <sh...@gmail.com>:

> Thanks Fabian,
>
> So by non working day, I mean,  I have a list of non working day in a year,
> which I can use to compare.
> I am very new to Flink and Flick CEP. Initially I thought there is a way to
> have within(time) value expression dynamically. So now I guess that's not
> possible.
>
> If I understand correctly, the other way around is to somehow manipulated
> stream (probably using ProcessFunction), and may be manipulate event time.
>
> Can you please help me with more pointer to how to go ahead with this.
> Please note that I am using event time processing.
>
> Your help is much appreciated.
> Thanks
>
>
>
> --
> Sent from: http://apache-flink-user-mailing-list-archive.2336050.
> n4.nabble.com/
>

Re: Flink CEP window for 1 working day

Posted by shishal <sh...@gmail.com>.
Thanks Fabian,

So by non working day, I mean,  I have a list of non working day in a year,
which I can use to compare.
I am very new to Flink and Flick CEP. Initially I thought there is a way to
have within(time) value expression dynamically. So now I guess that's not
possible. 

If I understand correctly, the other way around is to somehow manipulated
stream (probably using ProcessFunction), and may be manipulate event time.

Can you please help me with more pointer to how to go ahead with this.
Please note that I am using event time processing. 

Your help is much appreciated.
Thanks



--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/

Re: Flink CEP window for 1 working day

Posted by Fabian Hueske <fh...@gmail.com>.
Hi,

I'm afraid, Flink CEP does not distinguish work days from non-work days.
Of course, you could implement the logic in a DataStream program (probably
using ProcessFunction).

Best, Fabian

2018-03-20 15:44 GMT+01:00 shishal <sh...@gmail.com>:

> I am using flink CEP , and to match a event pattern in given time window we
> use *.within(Time.days(1))*
>
> Now in one of the case I need to wait for 1 working day instead of 1 day.
> Is
> there any way to do that in Flink CEP?
>
>
>
> --
> Sent from: http://apache-flink-user-mailing-list-archive.2336050.
> n4.nabble.com/
>