flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aljoscha Krettek <aljos...@apache.org>
Subject Re: window function outputs two different values
Date Tue, 10 Jan 2017 14:43:40 GMT
Hi,
I'm afraid this is not possible with the current model. A reduce function
is only meant to combine two values and output the result of that. Side
effects, such as emitting further data are not allowed right now.

Cheers,
Aljoscha

On Mon, 9 Jan 2017 at 15:27 tao xiao <xiaotao183@gmail.com> wrote:

> Hi team,
>
> any suggestions on below topic?
>
> I have a requirement that wants to output two different values from a time
> window reduce function. Here is basic workflow
>
> 1. fetch data from Kafka
> 2. flow the data to a event session window. kafka source -> keyBy ->
> session window -> reduce
> 3. inside the reduce function, count the number of data and also emit the
> data itself to another operator for further processing
>
> As the reduce function can only emit the count, I want to know how to also
> emit the data as well?
>
>
>
> On Sat, 7 Jan 2017 at 20:30 tao xiao <xiaotao183@gmail.com> wrote:
>
> Hi team,
>
> I have a requirement that wants to output two different values from a time
> window reduce function. Here is basic workflow
>
> 1. fetch data from Kafka
> 2. flow the data to a event session window. kafka source -> keyBy ->
> session window -> reduce
> 3. inside the reduce function, count the number of data and also emit the
> data itself to another operator for further processing
>
> As the reduce function can only emit the count, I want to know how to also
> emit the data as well?
>
>

Mime
View raw message