title: Persist in memory not working in Spark
body: <p>I am trying the persist feature in Spark to persist the data in memory and do computations on it. I am under the assumption that storing the data in memory would make the computations faster for iterative algorithms such as K-means clustering in MLlib.</p>
  
  <pre><code>    val data3 = sc.textFile("hdfs:.../inputData.txt")
      val parsedData3 = data3.map( _.split('\t').map(_.toDouble))
      parsedData3.persist(MEMORY_ONLY)
  </code></pre>
  
  <p>The call to persist throws the following error:</p>
  
  <pre><code>    scala&gt; parsedData3.persist(MEMORY_ONLY)
      &lt;console&gt;:17: error: not found: value MEMORY_ONLY
                    parsedData3.persist(MEMORY_ONLY)
  </code></pre>
  
  <p>Could someone help me with how to correctly use persist to save a data in memory for use in an iterative algorithm?</p>