static Optional<HStoreFile> getLargestFile(Collection<HStoreFile> candidates) {
    return candidates.stream().filter(f -> f.getReader() != null)
      .max((f1, f2) -> Long.compare(f1.getReader().length(), f2.getReader().length()));
  }
Gets the largest file (with reader) out of the list of files.
@param candidates The files to choose from.
@return The largest file; null if no file has a reader.
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreUtils.java