@Override public void map( LongWritable rawKey, Text rawValue, OutputCollector<TaggedFirstSecondIndexes, CSVReblockMR.BlockRow> out, Reporter reporter) throws IOException { if (_first) { rowOffset = offsetMap.get(rawKey.get()); _reporter = reporter; _first = false; } // output the header line if (rawKey.get() == 0 && _partFileWithHeader) { tfmapper.processHeaderLine(); if (tfmapper.hasHeader()) return; } // parse the input line and apply transformation String[] words = tfmapper.getWords(rawValue); if (!tfmapper.omit(words)) { words = tfmapper.apply(words); try { tfmapper.check(words); // Perform CSV Reblock CSVReblockInstruction ins = csv_reblock_instructions.get(0).get(0); idxRow = CSVReblockMapper.processRow( idxRow, words, rowOffset, num, ins.output, ins.brlen, ins.bclen, ins.fill, ins.fillValue, out); } catch (DMLRuntimeException e) { throw new RuntimeException(e.getMessage() + ":" + rawValue.toString()); } num++; } }