2

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
  • Just use Scala :) You will make your life so much easier. Commented Jun 20, 2014 at 13:08

1 Answer 1

4

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

Sign up to request clarification or add additional context in comments.

1 Comment

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?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.