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); }
@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)); }