A4
public class IntSumReducer extends Reducer<Text,Text,Text,IntWritable> {
private IntWritable result = new IntWritable();
public void reduce(Text key, Text values, Context context) throws IOException, InterruptedException {
String[] items = values.split(";");
int a = Integer.parseInt(items[0], 10);
int b = Integer.parseInt(items[1], 10);
int c = Integer.parseInt(items[2], 10);
int sum = (2 * a * b) * Math.abs(c + (4 * a));
result.set(sum);
context.write(key, result);
}
}