private SortedSet<CosmosContainerDeletionEntry> fetchContainerDeletionEntries(
      Collection<? extends PartitionId> assignedPartitions) throws CloudStorageException {
    Set<CosmosContainerDeletionEntry> containerDeletionEntrySet =
        requestAgent.doWithRetries(() -> cosmosDataAccessor.getDeprecatedContainers(containerDeletionQueryBatchSize),
            "GetDeprecatedContainers", null);
    Set<CosmosContainerDeletionEntry> assignedPartitionContainerDeletionEntries = new HashSet<>();
    Set<String> assignedPartitionSet =
        assignedPartitions.stream().map(PartitionId::toPathString).collect(Collectors.toSet());
    for (CosmosContainerDeletionEntry containerDeletionEntry : containerDeletionEntrySet) {
      Set<String> assignedDeletePendingPartitions = containerDeletionEntry.getDeletePendingPartitions()
          .stream()
          .filter(assignedPartitionSet::contains)
          .collect(Collectors.toSet());
      if (assignedDeletePendingPartitions.size() > 0) {
        assignedPartitionContainerDeletionEntries.add(
            new CosmosContainerDeletionEntry(containerDeletionEntry.getContainerId(),
                containerDeletionEntry.getAccountId(), containerDeletionEntry.getDeleteTriggerTimestamp(), false,
                assignedDeletePendingPartitions));
      }
    }
    SortedSet<CosmosContainerDeletionEntry> sortedContainerDeletionEntrySet =
        new TreeSet<>(Comparator.comparing(CosmosContainerDeletionEntry::getDeleteTriggerTimestamp));
    sortedContainerDeletionEntrySet.addAll(assignedPartitionContainerDeletionEntries);
    return sortedContainerDeletionEntrySet;
  }
Fetch the {@link CosmosContainerDeletionEntry} from cloud and create a cache with entries that have atleast one partition
assigned to current node.
ambry-cloud/src/main/java/com/github/ambry/cloud/azure/AzureContainerCompactor.java