org.apache.spark.streaming.dstream
Class ReceiverInputDStream<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.ReceiverInputDStream<T>
All Implemented Interfaces:
java.io.Serializable, Logging

public abstract class ReceiverInputDStream<T>
extends InputDStream<T>

Abstract class for defining any InputDStream that has to start a receiver on worker nodes to receive external data. Specific implementations of ReceiverInputDStream must define the getReceiver() function that gets the receiver object of type Receiver that will be sent to the workers to receive data. param: ssc_ Streaming context that will execute this input stream

See Also:
Serialized Form

Constructor Summary
ReceiverInputDStream(StreamingContext ssc_, scala.reflect.ClassTag<T> evidence$1)
           
 
Method Summary
 scala.Option<RDD<T>> compute(Time validTime)
          Method that generates a RDD for the given time
abstract  Receiver<T> getReceiver()
          Gets the receiver object that will be sent to the worker nodes to receive data.
 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

ReceiverInputDStream

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

getReceiver

public abstract Receiver<T> getReceiver()
Gets the receiver object that will be sent to the worker nodes to receive data. This method needs to defined by any specific implementation of a ReceiverInputDStream.

Returns:
(undocumented)

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>
Parameters:
validTime - (undocumented)
Returns:
(undocumented) Generates RDDs with blocks received by the receiver of this stream.