@Override
  public Collection<HStoreFile> getUnneededFiles(long maxTs, List<HStoreFile> filesCompacting) {
    ImmutableList<HStoreFile> files = storeFiles.all;
    // 1) We can never get rid of the last file which has the maximum seqid.
    // 2) Files that are not the latest can't become one due to (1), so the rest are fair game.
    return files.stream().limit(Math.max(0, files.size() - 1)).filter(sf -> {
      long fileTs = sf.getReader().getMaxTimestamp();
      if (fileTs < maxTs && !filesCompacting.contains(sf)) {
        LOG.info("Found an expired store file {} whose maxTimestamp is {}, which is below {}",
          sf.getPath(), fileTs, maxTs);
        return true;
      } else {
        return false;
      }
    }).collect(Collectors.toList());
  }
List of compacted files inside this store that needs to be excluded in reads because further
new reads will be using only the newly created files out of compaction. These compacted files
will be deleted/cleared once all the existing readers on these compacted files are done.
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/DefaultStoreFileManager.java