boolean isConditionalBalancingEnabled() {
    return !conditionalClasses.isEmpty();
  }
Balancer conditionals supplement cost functions in the {@link StochasticLoadBalancer}. Cost
functions are insufficient and difficult to work with when making discrete decisions; this is
because they operate on a continuous scale, and each cost function's multiplier affects the
relative importance of every other cost function. So it is difficult to meaningfully and clearly
value many aspects of your region distribution via cost functions alone. Conditionals allow you
to very clearly define discrete rules that your balancer would ideally follow. To clarify, a
conditional violation will not block a region assignment because we would prefer to have uptime
than have perfectly intentional balance. But conditionals allow you to, for example, define that
a region's primary and secondary should not live on the same rack. Another example, conditionals
make it easy to define that system tables will ideally be isolated on their own RegionServer
(without needing to manage distinct RegionServer groups).
hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/BalancerConditionals.java