int getViolationCountChange(BalancerClusterState cluster, BalanceAction action) {
    // Cluster is in pre-move state, so figure out the proposed violations
    boolean isViolatingPost = isViolating(cluster, action);
    cluster.doAction(action);

    // Cluster is in post-move state, so figure out the original violations
    BalanceAction undoAction = action.undoAction();
    boolean isViolatingPre = isViolating(cluster, undoAction);

    // Reset cluster
    cluster.doAction(undoAction);

    if (isViolatingPre == isViolatingPost) {
      return 0;
    } else if (!isViolatingPre && isViolatingPost) {
      return 1;
    } else {
      return -1;
    }
  }
Indicates whether the action is good for our conditional compliance.
@param cluster The cluster state
@param action  The proposed action
@return -1 if conditionals improve, 0 if neutral, 1 if conditionals degrade
hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/BalancerConditionals.java