I have a text file with each line having 2 integer values separated by space
Suppose i have two RDDs. One with a pair of values (x,y) where x and y are 2 integer values. Another RDD (rdd2 -> (a,b)) which has just one pair with two integer values a,b.
rdd1 = textfile.map(lambda line: line.split())
...
My aim is to subtract each value in rdd1 with its corresponding value in rdd2
The result would look like
x1-a,y1-b
x2-a,y2-b
x3-a,y3-b
...
How can i achieve this