Class ConstantInputDStream<T>

Object
org.apache.spark.streaming.dstream.DStream<T>
org.apache.spark.streaming.dstream.InputDStream<T>
org.apache.spark.streaming.dstream.ConstantInputDStream<T>
All Implemented Interfaces:
Serializable, org.apache.spark.internal.Logging, scala.Serializable

public class ConstantInputDStream<T> extends InputDStream<T>
An input stream that always returns the same RDD on each time step. Useful for testing.
See Also:
  • Constructor Details

    • ConstantInputDStream

      public ConstantInputDStream(StreamingContext _ssc, RDD<T> rdd, scala.reflect.ClassTag<T> evidence$1)
  • Method Details

    • compute

      public scala.Option<RDD<T>> compute(Time validTime)
      Description copied from class: DStream
      Method that generates an RDD for the given time
      Specified by:
      compute in class DStream<T>
    • start

      public void start()
      Description copied from class: InputDStream
      Method called to start receiving data. Subclasses must implement this method.
      Specified by:
      start in class InputDStream<T>
    • stop

      public void stop()
      Description copied from class: InputDStream
      Method called to stop receiving data. Subclasses must implement this method.
      Specified by:
      stop in class InputDStream<T>