private static int keyLength(short rlen, byte flen, int qlen) {
    return (int) KeyValue.getKeyDataStructureSize(rlen, flen, qlen);
  }
Returns number of bytes this cell's key part would have been used if serialized as in
{@link KeyValue}. Key includes rowkey, family, qualifier, timestamp and type.
@return the key length
hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValueUtil.java