Interface JavaDStreamLike<T,This extends JavaDStreamLike<T,This,R>,R extends JavaRDDLike<T,R>>

All Superinterfaces:
Serializable, scala.Serializable
All Known Implementing Classes:
JavaDStream, JavaInputDStream, JavaMapWithStateDStream, JavaPairDStream, JavaPairInputDStream, JavaPairReceiverInputDStream, JavaReceiverInputDStream

public interface JavaDStreamLike<T,This extends JavaDStreamLike<T,This,R>,R extends JavaRDDLike<T,R>> extends scala.Serializable
  • Method Details

    • checkpoint

      DStream<T> checkpoint(Duration interval)
      Enable periodic checkpointing of RDDs of this DStream.
      Parameters:
      interval - Time interval after which generated RDD will be checkpointed
      Returns:
      (undocumented)
    • classTag

      scala.reflect.ClassTag<T> classTag()
    • context

      StreamingContext context()
      Return the StreamingContext associated with this DStream
    • count

      JavaDStream<Long> count()
      Return a new DStream in which each RDD has a single element generated by counting each RDD of this DStream.
      Returns:
      (undocumented)
    • countByValue

      JavaPairDStream<T,Long> countByValue()
      Return a new DStream in which each RDD contains the counts of each distinct value in each RDD of this DStream. Hash partitioning is used to generate the RDDs with Spark's default number of partitions.
      Returns:
      (undocumented)
    • countByValue

      JavaPairDStream<T,Long> countByValue(int numPartitions)
      Return a new DStream in which each RDD contains the counts of each distinct value in each RDD of this DStream. Hash partitioning is used to generate the RDDs with numPartitions partitions.
      Parameters:
      numPartitions - number of partitions of each RDD in the new DStream.
      Returns:
      (undocumented)
    • countByValueAndWindow

      JavaPairDStream<T,Long> countByValueAndWindow(Duration windowDuration, Duration slideDuration)
      Return a new DStream in which each RDD contains the count of distinct elements in RDDs in a sliding window over this DStream. Hash partitioning is used to generate the RDDs with Spark's default number of partitions.
      Parameters:
      windowDuration - width of the window; must be a multiple of this DStream's batching interval
      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
      Returns:
      (undocumented)
    • countByValueAndWindow

      JavaPairDStream<T,Long> countByValueAndWindow(Duration windowDuration, Duration slideDuration, int numPartitions)
      Return a new DStream in which each RDD contains the count of distinct elements in RDDs in a sliding window over this DStream. Hash partitioning is used to generate the RDDs with numPartitions partitions.
      Parameters:
      windowDuration - width of the window; must be a multiple of this DStream's batching interval
      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
      numPartitions - number of partitions of each RDD in the new DStream.
      Returns:
      (undocumented)
    • countByWindow

      JavaDStream<Long> countByWindow(Duration windowDuration, Duration slideDuration)
      Return a new DStream in which each RDD has a single element generated by counting the number of elements in a window over this DStream. windowDuration and slideDuration are as defined in the window() operation. This is equivalent to window(windowDuration, slideDuration).count()
      Parameters:
      windowDuration - (undocumented)
      slideDuration - (undocumented)
      Returns:
      (undocumented)
    • dstream

      DStream<T> dstream()
    • flatMap

      <U> JavaDStream<U> flatMap(FlatMapFunction<T,U> f)
      Return a new DStream by applying a function to all elements of this DStream, and then flattening the results
      Parameters:
      f - (undocumented)
      Returns:
      (undocumented)
    • flatMapToPair

      <K2, V2> JavaPairDStream<K2,V2> flatMapToPair(PairFlatMapFunction<T,K2,V2> f)
      Return a new DStream by applying a function to all elements of this DStream, and then flattening the results
      Parameters:
      f - (undocumented)
      Returns:
      (undocumented)
    • foreachRDD

      void foreachRDD(VoidFunction<R> foreachFunc)
      Apply a function to each RDD in this DStream. This is an output operator, so 'this' DStream will be registered as an output stream and therefore materialized.
      Parameters:
      foreachFunc - (undocumented)
    • foreachRDD

      void foreachRDD(VoidFunction2<R,Time> foreachFunc)
      Apply a function to each RDD in this DStream. This is an output operator, so 'this' DStream will be registered as an output stream and therefore materialized.
      Parameters:
      foreachFunc - (undocumented)
    • glom

      JavaDStream<List<T>> glom()
      Return a new DStream in which each RDD is generated by applying glom() to each RDD of this DStream. Applying glom() to an RDD coalesces all elements within each partition into an array.
      Returns:
      (undocumented)
    • map

      <U> JavaDStream<U> map(Function<T,U> f)
      Return a new DStream by applying a function to all elements of this DStream.
    • mapPartitions

      <U> JavaDStream<U> mapPartitions(FlatMapFunction<Iterator<T>,U> f)
      Return a new DStream in which each RDD is generated by applying mapPartitions() to each RDDs of this DStream. Applying mapPartitions() to an RDD applies a function to each partition of the RDD.
      Parameters:
      f - (undocumented)
      Returns:
      (undocumented)
    • mapPartitionsToPair

      <K2, V2> JavaPairDStream<K2,V2> mapPartitionsToPair(PairFlatMapFunction<Iterator<T>,K2,V2> f)
      Return a new DStream in which each RDD is generated by applying mapPartitions() to each RDDs of this DStream. Applying mapPartitions() to an RDD applies a function to each partition of the RDD.
      Parameters:
      f - (undocumented)
      Returns:
      (undocumented)
    • mapToPair

      <K2, V2> JavaPairDStream<K2,V2> mapToPair(PairFunction<T,K2,V2> f)
      Return a new DStream by applying a function to all elements of this DStream.
    • print

      void print()
      Print the first ten elements of each RDD generated in this DStream. This is an output operator, so this DStream will be registered as an output stream and there materialized.
    • print

      void print(int num)
      Print the first num elements of each RDD generated in this DStream. This is an output operator, so this DStream will be registered as an output stream and there materialized.
      Parameters:
      num - (undocumented)
    • reduce

      JavaDStream<T> reduce(Function2<T,T,T> f)
      Return a new DStream in which each RDD has a single element generated by reducing each RDD of this DStream.
      Parameters:
      f - (undocumented)
      Returns:
      (undocumented)
    • reduceByWindow

      JavaDStream<T> reduceByWindow(Function2<T,T,T> reduceFunc, Duration windowDuration, Duration slideDuration)
      Return a new DStream in which each RDD has a single element generated by reducing all elements in a sliding window over this DStream.
      Parameters:
      reduceFunc - associative and commutative reduce function
      windowDuration - width of the window; must be a multiple of this DStream's batching interval
      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
      Returns:
      (undocumented)
    • reduceByWindow

      JavaDStream<T> reduceByWindow(Function2<T,T,T> reduceFunc, Function2<T,T,T> invReduceFunc, Duration windowDuration, Duration slideDuration)
      Return a new DStream in which each RDD has a single element generated by reducing all elements in a sliding window over this DStream. However, the reduction is done incrementally using the old window's reduced value : 1. reduce the new values that entered the window (e.g., adding new counts) 2. "inverse reduce" the old values that left the window (e.g., subtracting old counts) This is more efficient than reduceByWindow without "inverse reduce" function. However, it is applicable to only "invertible reduce functions".
      Parameters:
      reduceFunc - associative and commutative reduce function
      invReduceFunc - inverse reduce function; such that for all y, invertible x: invReduceFunc(reduceFunc(x, y), x) = y
      windowDuration - width of the window; must be a multiple of this DStream's batching interval
      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
      Returns:
      (undocumented)
    • scalaIntToJavaLong

      JavaDStream<Long> scalaIntToJavaLong(DStream<Object> in)
    • slice

      List<R> slice(Time fromTime, Time toTime)
      Return all the RDDs between 'fromDuration' to 'toDuration' (both included)
      Parameters:
      fromTime - (undocumented)
      toTime - (undocumented)
      Returns:
      (undocumented)
    • transform

      <U> JavaDStream<U> transform(Function<R,JavaRDD<U>> transformFunc)
      Return a new DStream in which each RDD is generated by applying a function on each RDD of 'this' DStream.
      Parameters:
      transformFunc - (undocumented)
      Returns:
      (undocumented)
    • transform

      <U> JavaDStream<U> transform(Function2<R,Time,JavaRDD<U>> transformFunc)
      Return a new DStream in which each RDD is generated by applying a function on each RDD of 'this' DStream.
      Parameters:
      transformFunc - (undocumented)
      Returns:
      (undocumented)
    • transformToPair

      <K2, V2> JavaPairDStream<K2,V2> transformToPair(Function<R,JavaPairRDD<K2,V2>> transformFunc)
      Return a new DStream in which each RDD is generated by applying a function on each RDD of 'this' DStream.
      Parameters:
      transformFunc - (undocumented)
      Returns:
      (undocumented)
    • transformToPair

      <K2, V2> JavaPairDStream<K2,V2> transformToPair(Function2<R,Time,JavaPairRDD<K2,V2>> transformFunc)
      Return a new DStream in which each RDD is generated by applying a function on each RDD of 'this' DStream.
      Parameters:
      transformFunc - (undocumented)
      Returns:
      (undocumented)
    • transformWith

      <U, W> JavaDStream<W> transformWith(JavaDStream<U> other, Function3<R,JavaRDD<U>,Time,JavaRDD<W>> transformFunc)
      Return a new DStream in which each RDD is generated by applying a function on each RDD of 'this' DStream and 'other' DStream.
      Parameters:
      other - (undocumented)
      transformFunc - (undocumented)
      Returns:
      (undocumented)
    • transformWith

      <K2, V2, W> JavaDStream<W> transformWith(JavaPairDStream<K2,V2> other, Function3<R,JavaPairRDD<K2,V2>,Time,JavaRDD<W>> transformFunc)
      Return a new DStream in which each RDD is generated by applying a function on each RDD of 'this' DStream and 'other' DStream.
      Parameters:
      other - (undocumented)
      transformFunc - (undocumented)
      Returns:
      (undocumented)
    • transformWithToPair

      <U, K2, V2> JavaPairDStream<K2,V2> transformWithToPair(JavaDStream<U> other, Function3<R,JavaRDD<U>,Time,JavaPairRDD<K2,V2>> transformFunc)
      Return a new DStream in which each RDD is generated by applying a function on each RDD of 'this' DStream and 'other' DStream.
      Parameters:
      other - (undocumented)
      transformFunc - (undocumented)
      Returns:
      (undocumented)
    • transformWithToPair

      <K2, V2, K3, V3> JavaPairDStream<K3,V3> transformWithToPair(JavaPairDStream<K2,V2> other, Function3<R,JavaPairRDD<K2,V2>,Time,JavaPairRDD<K3,V3>> transformFunc)
      Return a new DStream in which each RDD is generated by applying a function on each RDD of 'this' DStream and 'other' DStream.
      Parameters:
      other - (undocumented)
      transformFunc - (undocumented)
      Returns:
      (undocumented)
    • wrapRDD

      R wrapRDD(RDD<T> in)