flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fabian Hueske <fhue...@gmail.com>
Subject Re: Different Window Sizes in keyed stream
Date Fri, 23 Jun 2017 08:05:18 GMT
Hi Ahmad,

that is not possible, at least not with Flink's built-in windows.
You can probably implement something like that on top of the DataStream API
but I think it would quite a bit of effort.

IMO, the better approach would be to start a separate Flink job per tenant.
This would also improve the isolation and failure behavior.

Best, Fabian

2017-06-22 19:43 GMT+02:00 Ahmad Hassan <ahmad.hassan@gmail.com>:

> Hi All,
>
> I want to know if flink allows to define sliding window size and slide
> time on the fly. For example I want to configure sliding window of size 2
> min and slide 1 min for tenant A but size 10 min and slide min for tenant B
> in a keyed stream and so on for other tenants. My code is below.
>
> final DataStream<WindowStats> eventStream = inputStream
> .keyBy(TENANT, CATEGORY)
> .window(SlidingProcessingTimeWindows.of(Time.minutes(2,Time.minute(1)))
> .fold(new WindowStats(), newProductAggregationMapper(),
> newProductAggregationWindowFunction());
>
> Can I do that for unlimited number of tenants in flink ?
>
> Cheers,
>
> Dr. Ahmad Hassan

Mime
View raw message