title: How to create a a spark dataframe from Integer RDD
body: <p>How can I create a <code>DataFrame</code> from an <code>JavaRDD</code> contains Integers. I have done something like below but not working.</p>
  
  <pre><code>List&lt;Integer&gt; input = Arrays.asList(101, 103, 105);
  JavaRDD&lt;Integer&gt; inputRDD = sc.parallelize(input);
  DataFrame dataframe = sqlcontext.createDataFrame(inputRDD, Integer.class);
  </code></pre>
  
  <p>I got <code>ClassCastException</code> saying <code>org.apache.spark.sql.types.IntegerType$ cannot be cast to org.apache.spark.sql.types.StructType</code></p>
  
  <p>How can I achieve this?</p>