public static boolean isSrcDestSync(String srcZkString, String srcClusterName, String destZkString,
      String destClusterName) {

    HelixAdmin srcAdmin = new ZKHelixAdmin(srcZkString);
    Set<String> srcResources = new HashSet<>(srcAdmin.getResourcesInCluster(srcClusterName));
    HelixAdmin destAdmin = new ZKHelixAdmin(destZkString);
    Set<String> destResources = new HashSet<>(destAdmin.getResourcesInCluster(destClusterName));

    for (String resource : srcResources) {
      if (!isPartitionResourceName(resource)) {
        logger.error("[HelixSync] Ignore resource {} from source Ambry cluster", resource);
        continue;
      }
      if (!destResources.contains(resource)) {
        logger.error("[HelixSync] Resource {} from source Ambry cluster is absent in VCR cluster", resource);
        return false;
      }
      // check if every partition exist.
      Set<String> srcPartitions = srcAdmin.getResourceIdealState(srcClusterName, resource).getPartitionSet();
      Set<String> destPartitions = destAdmin.getResourceIdealState(destClusterName, resource).getPartitionSet();
      for (String partition : srcPartitions) {
        if (!destPartitions.contains(partition)) {
          logger.error("[HelixSync] Partition {} from source Ambry cluster is absent in VCR cluster", partition);
          return false;
        }
      }
    }
    return true;
  }
A method to verify resources and partitions in src cluster and dest cluster are same.
ambry-commons/src/main/java/com/github/ambry/clustermap/HelixVcrUtil.java