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!
1 Answer
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
1 Comment
Fisher Coder
Thanks @samthebest for pointing this approach, but I tried and faced with an issue, here's my question: stackoverflow.com/questions/44187041/…, do you have any ideas please?