I'm using the Apache Flink Streaming API through to process a data file and I'm interested in getting only the results from the last of the windows. Is there a way to do this? If it is not possible, I thought I could filter through the maximum of the first field in the resulted tuple (the Long value).
SingleOutputStreamOperator<Tuple12<Long, String, String, Integer, String, Integer, String, Integer, String, Integer, String, Integer>> top5SlidingEventTimeWindowsFiltered = top5SlidingEventTimeWindows.filter(new FilterFunction<Tuple12<Long,String,String,Integer,String,Integer,String,Integer,String,Integer,String,Integer>>() {
public boolean filter(
Tuple12<Long, String, String, Integer, String, Integer, String, Integer, String, Integer, String, Integer> value)
throws Exception {
…
}
});
In the above filtering transformation it would be to filter by the maximum value of the first field of the tuple. Is it possible to do that somehow?