Ejemplo n.º 1
0
        /// <summary>
        /// Return all the RDDs between 'fromTime' to 'toTime' (both included)
        /// </summary>
        /// <param name="fromTimeUtc"></param>
        /// <param name="toTimeUtc"></param>
        /// <returns></returns>
        public RDD <T>[] Slice(DateTime fromTimeUtc, DateTime toTimeUtc)
        {
            long fromUnixTime = (long)(fromTimeUtc - startUtc).TotalMilliseconds;
            long toUnixTime   = (long)(toTimeUtc - startUtc).TotalMilliseconds;

            return(DStreamProxy.Slice(fromUnixTime, toUnixTime).Select(r => new RDD <T>(r, streamingContext.SparkContext, serializedMode)).ToArray());
        }