0
votes

Windowing is going on infinite loop or something,i'm printing the data stream after processing but looks like its not hitting that point at all.

Below is my pseudo code.

Datastream env = StreamExecutionEnvironment.getExecutionEnvironment()    
env.setStreamTimeCharacteristic(TimeCharacteristic.EventTime)

Datastream stream = env.addSource() .map(mapping to java object) 
    .filter(filter for specific type of events) 
    .assignTimestampsAndWatermarks(
         new BoundedOutOfOrdernessTimestampExtractor(Time.seconds(2)){})

Datastream processedStream = stream .keyBy(...)  
    .window(TumblingEventTimeWindows.of(Time.seconds(10))) .reduce()

processedStream.print()

I added the log to print in reduce function. Logs are getting printed from reduce function. but the stream is not getting printed.

And the streaming source data is history data i.e.. more than 2 months old data. in case of history data streaming anything else needs to be set specifically?

Any inputs would be of great help..

1
Did you implement the extractTimestamp method in your BoundedOutOfOrdernessTimestampExtractor? - David Anderson
facing similar issue issue similar to what? - greybeard
Below is my pseudo code in java - so is it java or pseudo-code? - Alex Yu
@David Anderson : yes. I have added that implementation. Assigning timestamp seems to be working fine. But process function on window, which would be called once the window is complete and triggered to emit the records is not getting invoked. - user1506729
@greybeard : similar to this issue : stackoverflow.com/questions/52076584/… - user1506729

1 Answers

0
votes

You could use the Flink web UI to examine the watermarks, to see if the current watermark has advanced enough to trigger the window. For more information on watermarks, see the flink training site.