flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Knauf <konstantin.kn...@tngtech.com>
Subject Re: Result comparison from 2 DataStream Sources
Date Thu, 26 May 2016 17:48:28 GMT
Hi,

let me first check, if I understand your requirements correctly. I
assume you want to compare attribute price for objects with the same
name only, right?

Further, I assume the objects are some kind of offer/bid with a timestamp?

I think the solution heavily depends on how the records, which should be
compared relate in time. So basically, if an object arrives from one
source, which time window of objects from the other stream should be
considered for comparison?

Cheers,

Konstantin

On 26.05.2016 18:55, iñaki williams wrote:
> Hi!
> 
> I am working on something quite similar to the stockPrice example that
> is posted on the webpage
> (https://flink.apache.org/news/2015/02/09/streaming-example.html)
> 
> I am extracting some data from 2 different webpages and I represent the
> result using a java object. The diagram could be something like this:
> 
> DataStream1--------JavaObject(name, price) --\
>                                                                    \
>                                                                      [
> how to compare result?]
>                                                                    /
> DataStream2--------JavaObject(name, price) --/
> 
> 
> What I want to do is to get the attribute price from both data objects
> and compare it between each other / make some math operations. For
> example, if the first JavaObject.price is bigger than the second
> JavaObject.price, then show a message.
> 
> 
> Which is the (best) way of doing this? I am new using Flink and I am
> quite lost :)
> 
> 
> Thanks!

-- 
Konstantin Knauf * konstantin.knauf@tngtech.com * +49-174-3413182
TNG Technology Consulting GmbH, Betastr. 13a, 85774 Unterföhring
Geschäftsführer: Henrik Klagges, Christoph Stock, Dr. Robert Dahlke
Sitz: Unterföhring * Amtsgericht München * HRB 135082

Mime
View raw message