List<Pair<String, Long>> getAllCompactionProgress() throws Exception {
    // Read all checkpoint files and dump results into sortable table.
    BlobContainerAsyncClient containerAsyncClient = azureBlobDataAccessor.getStorageClient()
        .getBlobContainerAsyncClient(AzureCloudDestination.CHECKPOINT_CONTAINER);
    List<String> checkpoints = new ArrayList<>();
    containerAsyncClient.listBlobs().toIterable().forEach(item -> {
      checkpoints.add(item.getName());
    });
    logger.info("Retrieving checkpoints for {} partitions", checkpoints.size());
    List<Pair<String, Long>> partitionProgressList = Collections.synchronizedList(new ArrayList<>());
    ForkJoinPool forkJoinPool = new ForkJoinPool(numThreads);
    forkJoinPool.submit(() -> {
      checkpoints.parallelStream().forEach(partition -> {
        try {
          Map<String, Long> map = getCompactionProgress(partition);
          long progressTime = Collections.min(map.values());
          partitionProgressList.add(new Pair(partition, progressTime));
        } catch (CloudStorageException cse) {
          logger.error("Failed for partition {}", partition, cse);
        }
      });
    }).get();

    Collections.sort(partitionProgressList, Comparator.comparingLong(Pair::getSecond));
    return partitionProgressList;
  }
Retrieve the compaction progress for all partitions, sorted by furthest behind.
@return a list of pairs each containing a partition and its latest progress time.
@throws Exception
ambry-cloud/src/main/java/com/github/ambry/cloud/azure/AzureStorageCompactor.java