public void setKey(byte[] key, int offset, int length) {
      this.bytes = key;
      this.offset = offset;
      this.length = length;
      this.rowLen = Bytes.toShort(this.bytes, this.offset);
    }
A setter that helps to avoid object creation every time and whenever there is a need to
create new KeyOnlyKeyValue.
@param key    Key to set
@param offset Offset of the Key
@param length length of the Key
hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValue.java