TupleWindow Start/End Time in Apache Storm -


i have been developing profilling application works on cdr(call detail record) data in apache storm. application's main purpose extracting of caller totalcallcount , totalcallduration during specified time block(in every window). profilling want use slidingwindow technique.

to understand can @ following image slidingwindow image

for profilling need know when tuplewindow started , ended. mean timestamp of tuplewindow or timestamp of slidingwindow start , end.

even if looked implementation of storm, couldn't find that. me how can figure out?

thank much

if using 1.x release of apache storm, information not directly accessible via tuplewindow. have manually calculate this. e.g.

public class mybolt extends basewindowedbolt {   ...   long slidinginterval;    @override   public basewindowedbolt withwindow(duration windowlength, duration slidinginterval) {       this.slidinginterval = slidinginterval.value;       return super.withwindow(windowlength, slidinginterval);   }     public void execute(tuplewindow inputwindow) {     long = system.currenttimemillis();     long windowend = now;     long windowstart = - slidinginterval;     ...   } 

but may not pretty straight forward in cases if having event time windows.

in latest master branch of storm, tuplewindow has gettimestamp method returns window end timestamp , works both processing , event time based windows. available in future release of storm (2.0 release). ported , made available in future storm 1.x releases well.


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -