public static int lengthWithMvccVersion(final KeyValue kv, final boolean includeMvccVersion) {
    int length = kv.getLength();
    if (includeMvccVersion) {
      length += WritableUtils.getVIntSize(kv.getSequenceId());
    }
    return length;
  }
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