flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fabian Hueske <fhue...@gmail.com>
Subject Re: multiple processing of streams
Date Fri, 21 Oct 2016 15:17:35 GMT
Hi Robert,

it is certainly possible to feed the same DataStream into two (or more)
operators.
Both operators should then process the complete input stream.

What you describe is an unintended behavior.
Can you explain how you figure out that both window operators only receive
half of the events?

Thanks,
Fabian




2016-10-19 18:28 GMT+02:00 <robert.lancaster@hyatt.com>:

> Is it possible to process the same stream in two different ways?  I can’t
> find anything in the documentation definitively stating this is possible,
> but nor do I find anything stating it isn’t.  My attempt had some
> unexpected results, which I’ll explain below:
>
>
>
> Essentially, I have a stream of data I’m pulling from Kafka.  I want to
> build aggregate metrics on this data set using both tumbling windows as
> well as session windows.  So, I do something like the following:
>
>
>
> DataStream<MyRecordType> baseStream =
>
>                 env.addSource(….);            // pulling data from kafka
>
>        .map(…)                         // parse the raw input
>
>                       .assignTimestampsAndWatermarks(…);
>
>
>
> DataStream <Tuple..<…>> timeWindowedStream =
>
>                 baseStream.keyBy(…)
>
>                                       .timeWindow(…)           //
> tumbling window
>
>                                       .apply(…);                       //
> aggregation over tumbling window
>
>
>
> DataStream <Tuple..<…>> sessionWindowedStream =
>
>                 baseStream.keyBy(…)
>
>                                       .window(EventTimeSessionWindows.withGap(…))
>             // session window
>
>                                       .apply(…);
>                                                                    //
> aggregation over session window
>
>
>
> The issue is that when I view my job in the Flink dashboard, it indicates
> that each type of windowing is only receiving half of the records.  Is what
> I’m trying simply unsupported or is there something I’m missing?
>
>
>
> Thanks!
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> ------------------------------
> The information contained in this communication is confidential and
> intended only for the use of the recipient named above, and may be legally
> privileged and exempt from disclosure under applicable law. If the reader
> of this message is not the intended recipient, you are hereby notified that
> any dissemination, distribution or copying of this communication is
> strictly prohibited. If you have received this communication in error,
> please resend it to the sender and delete the original message and copy of
> it from your computer system. Opinions, conclusions and other information
> in this message that do not relate to our official business should be
> understood as neither given nor endorsed by the company.
>

Mime
View raw message