private Collection<PartitionId> getFilteredPartitions(Collection<? extends PartitionId> partitions) {
      Collection<PartitionId> filteredPartitions = new ArrayList<>();
      if (clusterManagerQueryHelper.isPartitionFilteringEnabled()) {
        for (PartitionId partition : partitions) {
          if (clusterManagerQueryHelper.isValidPartition(partition.toString())) {
            filteredPartitions.add(partition);
          }
        }
      } else {
        filteredPartitions.addAll(partitions);
      }
      return filteredPartitions;
    }
Gets the partitions after filtering based on replication factor comparison to routerputsuccesstarget
@param partitions
@return filtered partitions that can be written to
ambry-clustermap/src/main/java/com/github/ambry/clustermap/ClusterMapUtils.java