public static String getCellKeyAsString(Cell cell, Function<Cell, String> rowConverter) {
    StringBuilder sb = new StringBuilder(rowConverter.apply(cell));
    sb.append('/');
    sb.append(cell.getFamilyLength() == 0
      ? ""
      : Bytes.toStringBinary(cell.getFamilyArray(), cell.getFamilyOffset(),
        cell.getFamilyLength()));
    // KeyValue only added ':' if family is non-null. Do same.
    if (cell.getFamilyLength() > 0) sb.append(':');
    sb.append(cell.getQualifierLength() == 0
      ? ""
      : Bytes.toStringBinary(cell.getQualifierArray(), cell.getQualifierOffset(),
        cell.getQualifierLength()));
    sb.append('/');
    sb.append(KeyValue.humanReadableTimestamp(cell.getTimestamp()));
    sb.append('/');
    if (cell instanceof ExtendedCell) {
      sb.append(KeyValue.Type.codeToType(((ExtendedCell) cell).getTypeByte()));
    } else {
      sb.append(cell.getType());
    }

    if (!(cell instanceof KeyValue.KeyOnlyKeyValue)) {
      sb.append("/vlen=");
      sb.append(cell.getValueLength());
    }
    if (cell instanceof ExtendedCell) {
      sb.append("/seqid=");
      sb.append(((ExtendedCell) cell).getSequenceId());
    }

    return sb.toString();
  }
Return the Key portion of the passed <code>cell</code> as a String.
@param cell         the cell to convert
@param rowConverter used to convert the row of the cell to a string
@return The Key portion of the passed <code>cell</code> as a String.
hbase-common/src/main/java/org/apache/hadoop/hbase/CellUtil.java