org.apache.spark.streaming.dstream
Class ConstantInputDStream<T>

Object
  extended by org.apache.spark.streaming.dstream.DStream<T>
      extended by org.apache.spark.streaming.dstream.InputDStream<T>
          extended by org.apache.spark.streaming.dstream.ConstantInputDStream<T>
All Implemented Interfaces:
java.io.Serializable, Logging

public class ConstantInputDStream<T>
extends InputDStream<T>

An input stream that always returns the same RDD on each timestep. Useful for testing.

See Also:
Serialized Form

Constructor Summary
ConstantInputDStream(StreamingContext ssc_, RDD<T> rdd, scala.reflect.ClassTag<T> evidence$1)
           
 
Method Summary
 scala.Option<RDD<T>> compute(Time validTime)
          Method that generates a RDD for the given time
 void start()
          Method called to start receiving data.
 void stop()
          Method called to stop receiving data.
 
Methods inherited from class org.apache.spark.streaming.dstream.InputDStream
dependencies, id, lastValidTime, slideDuration
 
Methods inherited from class org.apache.spark.streaming.dstream.DStream
cache, checkpoint, checkpointData, checkpointDuration, context, count, countByValue, countByValueAndWindow, countByWindow, creationSite, filter, flatMap, foreach, foreach, foreachRDD, foreachRDD, generatedRDDs, glom, graph, map, mapPartitions, mustCheckpoint, persist, persist, print, print, reduce, reduceByWindow, reduceByWindow, rememberDuration, repartition, saveAsObjectFiles, saveAsTextFiles, slice, slice, ssc, storageLevel, toPairDStreamFunctions, transform, transform, transformWith, transformWith, union, window, window, zeroTime
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.spark.Logging
initializeIfNecessary, initializeLogging, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarning
 

Constructor Detail

ConstantInputDStream

public ConstantInputDStream(StreamingContext ssc_,
                            RDD<T> rdd,
                            scala.reflect.ClassTag<T> evidence$1)
Method Detail

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>

compute

public scala.Option<RDD<T>> compute(Time validTime)
Description copied from class: DStream
Method that generates a RDD for the given time

Specified by:
compute in class DStream<T>