@Override
  public void map(LongWritable offset, Text value, Context context) throws IOException {
    try {
      Pair<Integer, Integer> rowKeyOffests =
        parser.parseRowKey(value.getBytes(), value.getLength());
      ImmutableBytesWritable rowKey = new ImmutableBytesWritable(value.getBytes(),
        rowKeyOffests.getFirst(), rowKeyOffests.getSecond());
      context.write(rowKey, value);
    } catch (ImportTsv.TsvParser.BadTsvLineException | IllegalArgumentException badLine) {
      if (logBadLines) {
        System.err.println(value);
      }
      System.err.println("Bad line at offset: " + offset.get() + ":\n" + badLine.getMessage());
      if (skipBadLines) {
        incrementBadLineCount(1);
        return;
      }
      throw new IOException(badLine);
    } catch (InterruptedException e) {
      LOG.error("Interrupted while emitting TSV text", e);
      Thread.currentThread().interrupt();
    }
  }
Convert a line of TSV text into an HBase table row.
hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/TsvImporterTextMapper.java