P.S I'm new to developing map-reduce function and want to learn from not-so-typical examples. Can you help ?
Consider I have csv file containing four columns.
For example :
Now, if I want to retrieve "value in first column" of rows containing "40 in last column"
How could I do it using map-reduce ?
Output of this eg. would be :
Please supply code if possible.
Edit 1 :
I'm using StringTokenizer. So, in MAPPER function should I use variable say "pos"
and loop through tokens as in
if(pos == 1)
sale = word;
if(pos==4 && word.equals(40))
Would this work ?
P.S I have no idea how to traverse through tokens in each line.