ideally you want to "scan" through data once and the the (sum,count).
One simple solution is write your own map-reduce with key = department,
value = new VectorWritable(vector);
With vector is an array which array = salary, array = 1.
In the reduce phase all you need is to do the aggregation on array and
The reduce value is also array = sum of salary, array = sum of
This is common problem, I think others might have better solutions.
On Fri, Oct 5, 2012 at 3:02 PM, iwannaplay games <[EMAIL PROTECTED]
> ant result like
> Department TotalSalary count(employees)
> testing 7000 3