public static byte[] appendMetaData(byte[] id, byte[] data) {
    if (data == null || data.length == 0) {
      return data;
    }
    byte[] salt = Bytes.toBytes(ThreadLocalRandom.current().nextLong());
    int idLength = id.length + salt.length;
    byte[] newData = new byte[MAGIC_SIZE + ID_LENGTH_SIZE + idLength + data.length];
    int pos = 0;
    pos = Bytes.putByte(newData, pos, MAGIC);
    pos = Bytes.putInt(newData, pos, idLength);
    pos = Bytes.putBytes(newData, pos, id, 0, id.length);
    pos = Bytes.putBytes(newData, pos, salt, 0, salt.length);
    Bytes.putBytes(newData, pos, data, 0, data.length);
    return newData;
  }
The metadata append to the start of data on zookeeper.
hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKMetadata.java