@Override
    public int compare(Bucket o1, Bucket o2) {
      int result = Float.compare(o1.getLoad(), o2.getLoad());
      if (result == 0) {
        result = o2.getId() - o1.getId();
      }
      return result;
    }
A comparator that compares buckets by load, and then by bucket id.
geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/rebalance/PercentageMoveDirector.java