 <p><code>RDD</code> is Apache Spark's abstraction for a <strong>Distributed Resilient Dataset</strong> </p> <p>To create an <code>RDD</code> you'll need an instance of <code>SparkContext</code>, which can be thought of as a "connection" or "handle" to a <em>cluster</em> running Apache Spark. </p> <p><strong>Assuming</strong>:</p> <ul> <li>You have an instantiated <code>SparkContext</code></li> <li>You want to treat your input as a "flat" sequence of <code>(Double, Double)</code> values, <em>ignoring</em> the way these are currently "split" into sub-sequences in <code>Seq[Seq[(Double, Double)]]</code></li> </ul> <p>You can create an RDD as follows:</p> <pre><code>val sc: SparkContext = ??? val output: Seq[Seq[(Double, Double)]] = ??? val rdd: RDD[(Double, Double)] = sc.parallelize(output.flatten) </code></pre>