January 2019
Beginner to intermediate
154 pages
4h 31m
English
A pair RDD is a special type of RDD that processes data in the form of key-value pairs. Pair RDD is very useful because it enables basic functionalities such as join and aggregations. Spark provides some special operations on these RDDs in an optimized way. If we recall the examples where we calculated the number of INFO and ERROR messages in sampleFile.log using reduceByKey(), we can clearly see the importance of the pair RDD.
One of the ways to create a pair RDD is to parallelize a collection that contains elements in the form of Tuple. Let's look at some of the transformations provided by a pair RDD.
Read now
Unlock full access