@VisibleForTesting
  static ByteString encodeFileKey(Object fileKey) throws IOException {
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    DataOutputStream dos = new DataOutputStream(baos);
    if (fileKey instanceof SyntheticFileId) {
      SyntheticFileId fk = (SyntheticFileId) fileKey;
      fk.write(dos);
    } else {
      dos.writeLong((Long) fileKey);
    }
    return ByteString.copyFrom(baos.toByteArray());
  }
Internal helper class for extracting the metadata of the cache content and loading data into the cache
based on the provided metadata.
llap-server/src/java/org/apache/hadoop/hive/llap/io/api/impl/LlapCacheMetadataSerializer.java