protected void populatePut(byte[] lineBytes, ImportTsv.TsvParser.ParsedLine parsed, Put put,
    int i) throws BadTsvLineException, IOException {
    Cell cell = null;
    if (hfileOutPath == null) {
      cell = new KeyValue(lineBytes, parsed.getRowKeyOffset(), parsed.getRowKeyLength(),
        parser.getFamily(i), 0, parser.getFamily(i).length, parser.getQualifier(i), 0,
        parser.getQualifier(i).length, ts, KeyValue.Type.Put, lineBytes, parsed.getColumnOffset(i),
        parsed.getColumnLength(i));
      if (cellVisibilityExpr != null) {
        // We won't be validating the expression here. The Visibility CP will do
        // the validation
        put.setCellVisibility(new CellVisibility(cellVisibilityExpr));
      }
      if (ttl > 0) {
        put.setTTL(ttl);
      }
    } else {
      // Creating the KV which needs to be directly written to HFiles. Using the Facade
      // KVCreator for creation of kvs.
      cell = this.kvCreator.create(lineBytes, parsed.getRowKeyOffset(), parsed.getRowKeyLength(),
        parser.getFamily(i), 0, parser.getFamily(i).length, parser.getQualifier(i), 0,
        parser.getQualifier(i).length, ts, lineBytes, parsed.getColumnOffset(i),
        parsed.getColumnLength(i), tags);
    }
    put.add(cell);
  }
Convert a line of TSV text into an HBase table row.
hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/TsvImporterMapper.java