spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bipin <bipin....@gmail.com>
Subject Create dataframe from saved objectfile RDD
Date Mon, 01 Jun 2015 06:27:42 GMT
Hi, what is the method to create ddf from an RDD which is saved as
objectfile. I don't have a java object but a structtype I want to use as
schema for ddf. How to load the objectfile without the object.

I tried retrieving as Row
        val myrdd =
sc.objectFile[org.apache.spark.sql.Row]("/home/bipin/rawdata/"+name)

But I get 
java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to
org.apache.spark.sql.Row

How to work around this. Is there a better way.




--
View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/Create-dataframe-from-saved-objectfile-RDD-tp23095.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@spark.apache.org
For additional commands, e-mail: user-help@spark.apache.org


Mime
View raw message