title: How to add more RDD to existing RDD in Spark?
body: <p>I have a RDD and want to add more RDD to it. How can I do it in Spark?
  I have code like below. I want to return RDD from the dStream I have.</p>
  
  <pre><code>JavaDStream&lt;Object&gt; newDStream = dStream.map(this);
  JavaRDD&lt;Object&gt; rdd = context.sparkContext().emptyRDD();
  return newDStream.wrapRDD(context.sparkContext().emptyRDD());
  </code></pre>
  
  <p>I do not find much documentation about <a href="https://spark.apache.org/docs/1.5.0/api/java/org/apache/spark/streaming/api/java/JavaDStream.html#wrapRDD(org.apache.spark.rdd.RDD)" rel="nofollow">wrapRDD</a> method of JavaDStream class provided by Apache Spark. </p>