Hello all, I was playing around with the the IncrementalLearningSkeleton example and I had a couple of questions regarding the behavior of connected streams.DataStream<Double[]> model = trainingData .assignTimestampsAndWatermarks(new LinearTimestamp()) .timeWindowAll(Time.of(5000, TimeUnit.MILLISECONDS)) .apply(new PartialModelBuilder()); by having a model variable shared between the two map functions in the coMap class. The shared model var is updated every time an element from the model stream arrives (starts out as null) DataStream<Integer> prediction = newData.connect(model).map(new Predictor()); and I use readTextFile to read in the trainingData and newData : DataStream<ArrayList<Double>> model = trainingData .countWindowAll(100) .apply(new PartialModelBuilder()); (i.e. here I'm interested in streaming historical data, I assume their order does not matter) |
Hi :) The execution of the Connected functions (map1/map2 in this case) are not affected by the timestamps. In other words it is pretty much arbitrary which input arrives at the CoMapFunction first. So I think you did everything correctly. Gyula Theodore Vasiloudis <[hidden email]> ezt írta (időpont: 2016. nov. 21., H, 12:07):
|
Thanks for the clarification Gyula! In that case, is it possible currently to make one of the two connected streams stall until the other stream has produced at least one output before it starts producing as well?On Mon, Nov 21, 2016 at 3:16 PM, Gyula Fóra <[hidden email]> wrote:
|
Nope, not right now but this is pretty much what we're trying to solve with side inputs: https://docs.google.com/document/d/1hIgxi2Zchww_5fWUHLoYiXwSBXjv-M5eOv-MKQYN3m4/edit On Mon, 21 Nov 2016 at 16:11 Theodore Vasiloudis <[hidden email]> wrote:
|
Free forum by Nabble | Edit this page |