I'm not sure if this is a "best practice" for debugging, but I found that if
use apply()
one of the parameters passed into the WindowFunction that I must implement
contains
a TimeWindow object, that has start and end times:

private static class MyApplyWindowFunction implements
WindowFunction<Tuple2&lt;String,Integer>, Tuple2<String,Integer>, Tuple,
TimeWindow> {

                @Override
                public void apply(Tuple key, TimeWindow window, 
Iterable<Tuple2&lt;String,
Integer>> input,
                                Collector<Tuple2&lt;String, Integer>> out) 
throws Exception {
                        
                        System.out.println("ApplyWindowFunction BEGIN: " + 
key.getField(0));
                        System.out.println("WINDOW START=" + window.getStart());
                        System.out.println("WINDOW END=" + window.getEnd());
                        
                        
                }
}



--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/

Reply via email to