using mapreduce api instead of mapred which is old