Calculate Average over a Window

2018-01-21 Thread Steiner Patrick
Hi, I'm in the process of porting work that I have done based on JBoss Technology ( ActiveMQ, Drools, etc ) to GCloud. The scenario is a simple IoT example with devices sending their values via MQTT to PubSub and getting received by Dataflow for processing. So far, while learning GCloud fea

Re: Calculate Average over a Window

2018-01-25 Thread Steiner Patrick
five minutes. These are included with the SDK, and documented here: https://beam.apache.org/documentation/programming-guide/#provided-windowing-functions Hope that gets you started, Kenn On Sun, Jan 21, 2018 at 8:29 AM, Steiner Patrick mailto:patr...@steiner-buchholz.de>> wrote:

Re: Calculate Average over a Window

2018-01-26 Thread Steiner Patrick
Message 1 "4711" : "{temp=10}" will become "4711" : "{temp=10, avg_temp=10}" Message 2 "4711" : "{temp=12}" will become "4711" : "{temp=12, avg_temp=11}" Message 3 "4711" : "{temp=14}" will be

Re: Calculate Average over a Window

2018-01-30 Thread Steiner Patrick
PCollection> joined = ... PCollection> result = joined.apply(ParDo.of()) Kenn [1] https://beam.apache.org/documentation/programming-guide/#cogroupbykey On Fri, Jan 26, 2018 at 6:23 AM, Steiner Patrick mailto:patr...@steiner-buchholz.de>> wrote: Hi Kenn, th

CoGroupByKey question

2018-02-08 Thread Steiner Patrick
Hi all, I'm trying to combine two PCollections> via CoGroupByKey When adapting the sample code final TupleTag t1 = new TupleTag<>(); final TupleTag t2 = new TupleTag<>(); PCollection> coGbkResultCollection = KeyedPCollectionTuple.of(t1, pt1) .and(t2, pt2) .apply(CoGroup

Re: CoGroupByKey question

2018-02-09 Thread Steiner Patrick
a type? On Thu, Feb 8, 2018 at 2:53 AM Steiner Patrick mailto:patr...@steiner-buchholz.de>> wrote: Hi all, I'm trying to combine two PCollections> via CoGroupByKey When adapting the sample code final TupleTag t1 = new TupleTag<>(); final TupleT