private static DiskRangeList decodeRanges(List<LlapDaemonProtocolProtos.CacheEntryRange> ranges) {
    DiskRangeList.CreateHelper helper = new DiskRangeList.CreateHelper();
    ranges.stream().sorted(Comparator.comparing(LlapDaemonProtocolProtos.CacheEntryRange::getStart))
        .forEach(r -> helper.addOrMerge(r.getStart(), r.getEnd(), false, false));
    return helper.get();
  }
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