Regarding pairdrdd output using map function

#1

Hi

Pair RDD contains key values or tuples ? some basic datatype related question

val orders = sc.textFile("/public/retail_db/orders")

val ordersPairedRDD = orders.map(order => {
val o = order.split(",")
(o(0).toInt, o(1).substring(0, 10).replace("-", “”).toInt)
})

it gives output as key-value like (1,20130725), so this is called as tuple also?

(1,20130725),(2,20140721) can be called as tuple ?

0 Likes