What is the best way to make key value pairs out of a HDFS sequence file? The reason why I am asking, I have to sort a sequence file. The sortByKey method is not available unless your RDD is in the form of key value pairs. I am using Apache Spark 1.0.2 and HDFS 2.5.0 .
Take the 2-minute tour
×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
From Spark documentation :
Key point is that you have to map Hadoop Types to [String, Int, ...] and built your desired (k,v) rdd in order to apply sortByKey method.
|
|||||||||
|