Re: How to store JavaRDD as a sequence file using spark java API?

2014-06-20 Thread abhiguruvayya
Any inputs on this will be helpful.



--
View this message in context: 
http://apache-spark-user-list.1001560.n3.nabble.com/How-to-store-JavaRDD-as-a-sequence-file-using-spark-java-API-tp7969p7980.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.


Re: How to store JavaRDD as a sequence file using spark java API?

2014-06-20 Thread Shixiong Zhu
You can use JavaPairRDD.saveAsHadoopFile/saveAsNewAPIHadoopFile.

Best Regards,
Shixiong Zhu


2014-06-20 14:22 GMT+08:00 abhiguruvayya sharath.abhis...@gmail.com:

 Any inputs on this will be helpful.



 --
 View this message in context:
 http://apache-spark-user-list.1001560.n3.nabble.com/How-to-store-JavaRDD-as-a-sequence-file-using-spark-java-API-tp7969p7980.html
 Sent from the Apache Spark User List mailing list archive at Nabble.com.



Re: How to store JavaRDD as a sequence file using spark java API?

2014-06-20 Thread abhiguruvayya
Does JavaPairRDD.saveAsHadoopFile store data as a sequenceFile? Then what is
the significance of RDD.saveAsSequenceFile?



--
View this message in context: 
http://apache-spark-user-list.1001560.n3.nabble.com/How-to-store-JavaRDD-as-a-sequence-file-using-spark-java-API-tp7969p7983.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.


Re: How to store JavaRDD as a sequence file using spark java API?

2014-06-20 Thread Kan Zhang
Yes, it can if you set the output format to SequenceFileOutputFormat. The
difference is saveAsSequenceFile does the conversion to Writable for you if
needed and then calls saveAsHadoopFile.


On Fri, Jun 20, 2014 at 12:43 AM, abhiguruvayya sharath.abhis...@gmail.com
wrote:

 Does JavaPairRDD.saveAsHadoopFile store data as a sequenceFile? Then what
 is
 the significance of RDD.saveAsSequenceFile?



 --
 View this message in context:
 http://apache-spark-user-list.1001560.n3.nabble.com/How-to-store-JavaRDD-as-a-sequence-file-using-spark-java-API-tp7969p7983.html
 Sent from the Apache Spark User List mailing list archive at Nabble.com.



How to store JavaRDD as a sequence file using spark java API?

2014-06-19 Thread abhiguruvayya
I want to store JavaRDD as a sequence file instead of textfile. But i don't
see any Java API for that. Is there a way for this? Please let me know.
Thanks!



--
View this message in context: 
http://apache-spark-user-list.1001560.n3.nabble.com/How-to-store-JavaRDD-as-a-sequence-file-using-spark-java-API-tp7969.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.


Re: How to store JavaRDD as a sequence file using spark java API?

2014-06-19 Thread Kan Zhang
Can you use saveAsObjectFile?


On Thu, Jun 19, 2014 at 5:54 PM, abhiguruvayya sharath.abhis...@gmail.com
wrote:

 I want to store JavaRDD as a sequence file instead of textfile. But i don't
 see any Java API for that. Is there a way for this? Please let me know.
 Thanks!



 --
 View this message in context:
 http://apache-spark-user-list.1001560.n3.nabble.com/How-to-store-JavaRDD-as-a-sequence-file-using-spark-java-API-tp7969.html
 Sent from the Apache Spark User List mailing list archive at Nabble.com.



Re: How to store JavaRDD as a sequence file using spark java API?

2014-06-19 Thread abhiguruvayya
No.  My understanding by reading the code is that RDD.saveAsObjectFile uses
Java Serialization and RDD.saveAsSequenceFile uses Writable which is tied to
the Writable Serialization framework in HDFS. 



--
View this message in context: 
http://apache-spark-user-list.1001560.n3.nabble.com/How-to-store-JavaRDD-as-a-sequence-file-using-spark-java-API-tp7969p7973.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.