title: java.io.FileNotFoundException in Spark
body: <p>I'm new here to learn Spark and Scala using the Notebook and Cluster in <a href="http://community.cloud.databricks.com/" rel="nofollow noreferrer">Databricks.com</a>, here is my very simple code to load a file:</p>
  <pre><code>import sys.process._
  val localpath=&quot;file:/tmp/myfile.json&quot;
  dbutils.fs.mkdirs(&quot;dbfs:/datasets/&quot;)
  dbutils.fs.cp(localpath, &quot;dbfs:/datasets/&quot;)
  </code></pre>
  <p>but I got error like this:</p>
  <blockquote>
  <p>java.io.FileNotFoundException: File file:/tmp/myfile.json does not exist.</p>
  <p>at org.apache.hadoop.fs.RawLocalFileSystem.getFileStatus(RawLocalFileSystem.java:402)</p>
  <p>at org.apache.hadoop.fs.FilterFileSystem.getFileStatus(FilterFileSystem.java:255)</p>
  <p>at com.databricks.backend.daemon.dbutils.FSUtils$.cp(DBUtilsCore.scala:82)</p>
  <p>at com.databricks.dbutils_v1.impl.DbfsUtilsImpl.cp(DbfsUtilsImpl.scala:40)</p>
  </blockquote>
  <p>I'm using Mac and I've made sure that the file exists in this absolute path, is this a spark error? Thanks!</p>