Example #1
0
    public void map(LongWritable k, Text val, OutputCollector<MyType, Text> oc, Reporter reporter)
        throws IOException {

      // Split the line
      List<Text> fields = Library.splitLine(val, '');
      if (fields.size() != 9) return;

      oc.collect(new MyType(fields.get(3), fields.get(2), fields.get(6)), val);
    }
Example #2
0
File: L4.java Project: kaituo/sedge
    @Override
    public void map(LongWritable k, Text val, OutputCollector<Text, Text> oc, Reporter reporter)
        throws IOException {

      // Split the line
      List<Text> fields = Library.splitLine(val, '');
      if (fields.size() != 9) return;

      oc.collect(fields.get(0), fields.get(1));
    }