Exemplo n.º 1
0
 /// <summary>
 /// Return a new DStream in which each RDD contains all the elements in seen in a
 /// sliding window of time over this DStream.
 ///
 /// @param windowDuration: width of the window; must be a multiple of this DStream's
 ///                      batching interval
 /// @param slideDuration:  sliding interval of the window (i.e., the interval after which
 ///                      the new DStream will generate RDDs); must be a multiple of this
 ///                      DStream's batching interval
 /// </summary>
 /// <param name="windowSeconds"></param>
 /// <param name="slideSeconds"></param>
 /// <returns></returns>
 public DStream <T> Window(int windowSeconds, int slideSeconds)
 {
     ValidateWindowParam(windowSeconds, slideSeconds);
     return(new DStream <T>(DStreamProxy.Window(windowSeconds, slideSeconds), streamingContext, serializedMode));
 }