public void map(
        LongWritable key, Text value, OutputCollector<Text, Text> output, Reporter reporter)
        throws IOException {

      parser.parse(value);
      output.collect(new Text(parser.getStationId()), value);
    }
コード例 #2
0
    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()); /*]*/
      }
    }