No, this isn't supported directly. However, you can create the same effect
as you describe by using the common denominator and checking which value
you're in, ie
if(now > lastTimeWeDidA + 30)
{
// blah
lastTimeWeDidA = now }
if(now > lastTimeWeDidB + 90)
{
// blah
lastTimeWeDidB = now
}
Since this is pretty easy to implement directly or with a quick wrapper,
I'm not sure how necessary it is to add to the Samza code itself. Do you
have other use cases?
-Jakob
On Fri, Mar 14, 2014 at 10:59 AM, Yan Fang <[email protected]> wrote:
> Hi Guys,
>
> I am wondering if Samza supports having multiple windows in one Samza job.
> So far, haven't found out any information about that.
>
> A simple use case is that, we want to count the events every 10s, 30s, etc.
> (yes, of course, we can just sum the last three 10s' results to get 30s'
> result...but that is not what I mean...). Basically, we want to trigger
> different activities in different intervals.
>
> How do you guys deal with this kind of use case in Samza? Currently, I am
> using another Samza job to do another interval task and feeling that is a
> little overkill because sometimes all the code in the process() method of
> StreamTask is exactly the same; the difference is only in window() method.
> Thank you.
>
> Cheers,
>
> Fang, Yan
> [email protected]
> +1 (206) 849-4108
>