mapreduce impl - avg,sum,count,min,max,distinct