private static LlapDaemonProtocolProtos.CacheEntry.Builder lookupOrCreateCacheEntryFromDataBuffer(
      Map<Object, LlapDaemonProtocolProtos.CacheEntry.Builder> lookupMap, LlapDataBuffer db, Object fileKey,
      String path) throws IOException {
    LlapDaemonProtocolProtos.CacheEntry.Builder builder = lookupMap.get(fileKey);
    if (builder == null) {
      ByteString encodedFileKey = encodeFileKey(fileKey);
      LlapDaemonProtocolProtos.CacheTag.Builder ctb = encodeCacheTag(db.getTag());
      builder = LlapDaemonProtocolProtos.CacheEntry.newBuilder().setFileKey(encodedFileKey).setCacheTag(ctb)
          .setFilePath(path);

      lookupMap.put(fileKey, builder);
    }
    return builder;
  }
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