Esempio n. 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);
    }
Esempio n. 2
0
File: L4.java Progetto: 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));
    }