private Set<String> getSealedPartitionsInHelixCluster() throws Exception {
    info("Aggregating sealed partitions from cluster {} in Helix", clusterName);
    CountDownLatch sealedPartitionLatch = new CountDownLatch(adminForDc.size());
    AtomicInteger errorCount = new AtomicInteger();
    Map<String, Set<String>> dcToSealedPartitions = new ConcurrentHashMap<>();
    Map<String, Set<String>> nodeToNonExistentReplicas = new ConcurrentHashMap<>();
    for (Datacenter dc : staticClusterMap.hardwareLayout.getDatacenters()) {
      HelixAdmin admin = adminForDc.get(dc.getName());
      if (admin == null) {
        info("Skipping {}", dc.getName());
        continue;
      }
      ensureOrThrow(isClusterPresent(dc.getName()),
          "Cluster not found in ZK " + dataCenterToZkAddress.get(dc.getName()));
      Utils.newThread(() -> {
        try {
          getSealedPartitionsInDc(dc, dcToSealedPartitions, nodeToNonExistentReplicas);
        } catch (Throwable t) {
          logger.error("[{}] error message: {}", dc.getName().toUpperCase(), t.getMessage());
          errorCount.getAndIncrement();
        } finally {
          sealedPartitionLatch.countDown();
        }
      }, false).start();
    }
    sealedPartitionLatch.await(10, TimeUnit.MINUTES);
    ensureOrThrow(errorCount.get() == 0, "Error occurred when aggregating sealed partitions in cluster " + clusterName);
    Set<String> sealedPartitionsInCluster = new HashSet<>();
    info("========================= Summary =========================");
    for (Map.Entry<String, Set<String>> entry : dcToSealedPartitions.entrySet()) {
      info("Dc {} has {} sealed partitions.", entry.getKey(), entry.getValue().size());
      sealedPartitionsInCluster.addAll(entry.getValue());
    }
    info("========================= Sealed Partitions across All DCs =========================");
    info("Total number of sealed partitions in cluster = {}", sealedPartitionsInCluster.size());
    info("Sealed partitions are {}", sealedPartitionsInCluster.toString());
    if (!nodeToNonExistentReplicas.isEmpty()) {
      info("Following {} nodes have sealed replica that are not actually present", nodeToNonExistentReplicas.size());
      for (Map.Entry<String, Set<String>> entry : nodeToNonExistentReplicas.entrySet()) {
        info("{} has non-existent replicas: {}", entry.getKey(), entry.getValue().toString());
      }
    }
    info("Successfully aggregate sealed from cluster {} in Helix", clusterName);
    return sealedPartitionsInCluster;
  }
Get sealed partitions from Helix cluster.
@return a set of sealed partitions across all DCs.
ambry-clustermap/src/main/java/com/github/ambry/clustermap/HelixBootstrapUpgradeUtil.java