code: public static Cluster swapPartitions(final Cluster nextCandidateCluster,
                                           final int nodeIdA,
                                           final int partitionIdA,
                                           final int nodeIdB,
                                           final int partitionIdB) {
          Cluster returnCluster = Cluster.cloneCluster(nextCandidateCluster);
  
          // Swap partitions between nodes!
          returnCluster = UpdateClusterUtils.createUpdatedCluster(returnCluster,
                                                                  nodeIdA,
                                                                  Lists.newArrayList(partitionIdB));
          returnCluster = UpdateClusterUtils.createUpdatedCluster(returnCluster,
                                                                  nodeIdB,
                                                                  Lists.newArrayList(partitionIdA));
  
          return returnCluster;
      }
docs: Swaps two specified partitions.
  
  Pair-wase partition swapping may be more prone to local minima than
  larger perturbations. Could consider "swapping" a list of
  <nodeId/partitionId>. This would allow a few nodes to be identified
  (random # btw 2-5?) and then "swapped" (shuffled? rotated?).
  
  @return modified cluster metadata.