Reputation: 2167
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!
Upvotes: 2
Views: 3920
Reputation: 31515
Maybe JavaPairRDD
has a method .saveAsSequenceFile
if not I think you can use .saveAsHadoopFile
and have SequenceFileOutputFormat.class
as the format param. It seems to be explained a bit here: http://apache-spark-user-list.1001560.n3.nabble.com/Spark-SequenceFile-Java-API-Repeat-Key-Values-td353.html
Upvotes: 4