title: unable to create dataframe from sequence file in Spark created by Sqoop
body: <p>I want to read <code>orders</code> data and create RDD out of it which is stored as <code>sequence</code> file in hadoop fs in <code>cloudera</code> <code>vm</code>. Below are my steps: </p>
  
  <p>1) Importing orders data as sequence file:</p>
  
  <pre><code>sqoop import --connect jdbc:mysql://localhost/retail_db --username retail_dba --password cloudera  --table orders -m 1 --target-dir /ordersDataSet --as-sequencefile   
  </code></pre>
  
  <p>2) Reading file in spark scala:  </p>
  
  <p><strong>Spark 1.6</strong></p>
  
  <pre><code>val sequenceData=sc.sequenceFile("/ordersDataSet",classOf[org.apache.hadoop.io.Text],classOf[org.apache.hadoop.io.Text]).map(rec =&gt; rec.toString())  
  </code></pre>
  
  <p>3) When I try to read data from above RDD it throws below error:  </p>
  
  <pre><code>Caused by: java.io.IOException: WritableName can't load class: orders
      at org.apache.hadoop.io.WritableName.getClass(WritableName.java:77)
      at org.apache.hadoop.io.SequenceFile$Reader.getValueClass(SequenceFile.java:2108)
      ... 17 more
  Caused by: java.lang.ClassNotFoundException: Class orders not found
      at org.apache.hadoop.conf.Configuration.getClassByName(Configuration.java:2185)
      at org.apache.hadoop.io.WritableName.getClass(WritableName.java:75)
      ... 18 more
  </code></pre>
  
  <p>I don't know why it says that it can't find orders. Where am I going wrong ?  </p>
  
  <p>I referred codes from these two links as well but no luck:<br>
  1) <a href="https://github.com/dgadiraju/code/blob/master/hadoop/edw/cloudera/spark/spark_demo_scala.txt" rel="nofollow noreferrer">Refer sequence part</a><br>
  2) <a href="http://arun-teaches-u-tech.blogspot.com/p/cca-175-hadoop-and-spark-developer-exam_5.html" rel="nofollow noreferrer">Refer step no. 8</a>  </p>