Hi Robin,
You are a star! Thank you for the explanation and example. I converted your
code into Java without any hassle. It is working as I expected. I carried
out the final calculation (5th/6th) using mapValues and it is working
nicely. But I was wondering is there a better way to do it other
have a mapper that emit key/value pairs(composite keys and composite
values separated by comma).
e.g
*key:* a,b,c,d *Value:* 1,2,3,4,5
*key:* a1,b1,c1,d1 *Value:* 5,4,3,2,1
...
...
*key:* a,b,c,d *Value:* 5,4,3,2,1
I could easily SUM these values using reduceByKey.
e.g.
reduceByKey(new