I have a JavaPairRDD in the following format:
JavaPairRDD< String, Tuple2< String, List< String>>> myData;
I want to save it as a Key-Value format (String, Tuple2< String, List< String>>)
.
myData.saveAsXXXFile("output-path");
So my next job could read in the data directly to my JavaPairRDD
:
JavaPairRDD< String, Tuple2< String, List< String>>> newData = context.XXXFile("output-path");
I am using Java 7, Spark 1.2, Java API. I tried saveAsTextFile
and saveAsObjectFile
, neither works. And I don't see saveAsSequenceFile
option in my eclipse.
Does anyone have any suggestion for this problem? Thank you very much!