SHARE
TWEET

Untitled

a guest Feb 18th, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. val inputData: mutable.Queue[RDD[String]] = mutable.Queue()
  2.   val inputStream: InputDStream[String] = streamingContext.queueStream(inputData)
  3.  
  4.  
  5.   inputData += sparkContext.parallelize(Seq("Test1"))
  6.   inputData += sparkContext.parallelize(Seq("Test2"))
  7.  
  8.   val iDStream = inputStream.cache()
  9.  
  10.   println("Size is: "+iDStream.count())
  11.  
  12.   iDStream.foreachRDD(rdd => println(rdd))
  13.  
  14.   streamingContext.start()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top