Question
What does mapValues do on a pair RDD?
Select an option. Your answer will be checked instantly.
Correct Answer: A. Transforms values while preserving keys and partitioning
Explanation:
mapValues applies a function only to each value.
Preserving partitioning can avoid unnecessary shuffles in later operations.
Leave a Reply