Java tutorial
/* * ============================================================ * The SSE USTC Software License * * PrintKeysReducer.java * 20141014 * * Copyright (c) 2006 China Payment and Remittance Service Co.,Ltd * All rights reserved. * ============================================================ */ package comm; import java.io.IOException; import org.apache.hadoop.io.NullWritable; import org.apache.hadoop.io.Text; import org.apache.hadoop.mapreduce.Reducer; /** * ??value * <p> * date author email notes<br /> * ----------------------------------------------------------------<br /> *20141014 starqiu@mail.ustc.edu.cn <br /></p> * */ public class PrintValuesReducer extends Reducer<Text, Object, NullWritable, Object> { public void reduce(Text _key, Iterable<Object> values, Context context) throws IOException, InterruptedException { // process values for (Object val : values) { context.write(NullWritable.get(), val); System.out.println(val); } } }