Pair RDD : Is Key value pair RDD
(key , value),
(Key,Value)
Create Pair RDD :
1. From Regular RDD
2. With In-memory collection (with Parallelize directly)
****************************************************************************
Pair RDD Functions :
reduceByKey
countByKey
countByValue
****************************************************************************
Scenarios :
How many times each word is repeated in the given document ?
Totale sales amount by product (by key) ?
Count of by key ?
Count By value ?
flatMap() Vs map()
flatMap : each element of RDD
map: On each row of rdd