Reputation: 2072
I did some calculation and returned my values in a RDD containing scala map and now I want to remove this map and want to collect all keys values in a RDD.
Any help will be appreciated.
Upvotes: 0
Views: 708
Reputation: 42045
You can call flatMap with the identity function to 'flatten' the structure of your RDD.
rdd.flatMap(identity)
Upvotes: 2