public void reduce( IntPair key, Iterator<NullWritable> values, OutputCollector<IntPair, NullWritable> output, Reporter reporter) throws IOException { /*[*/ output.collect(key, NullWritable.get()); /*]*/ }
public void map( LongWritable key, Text value, OutputCollector<IntPair, NullWritable> output, Reporter reporter) throws IOException { parser.parse(value); if (parser.isValidTemperature()) { /*[*/ output.collect( new IntPair(parser.getYearInt(), +parser.getAirTemperature()), NullWritable.get()); /*]*/ } }
@SuppressWarnings("unchecked") public void reduce( Text key, Iterator<Text> values, OutputCollector<NullWritable, Text> output, Reporter reporter) throws IOException { OutputCollector collector = multipleOutputs.getCollector("station", key.toString().replace("-", ""), reporter); while (values.hasNext()) { collector.collect(NullWritable.get(), values.next()); } }