presto-raptor-legacy/src/main/java/io/prestosql/plugin/raptor/legacy/storage/BucketBalancer.java/BucketBalancer/balance
class BucketBalancer:    @VisibleForTesting
    synchronized int balance()
    {
        log.info("Bucket balancer started. Computing assignments...");
        Multimap<String, BucketAssignment> sourceToAssignmentChanges = computeAssignmentChanges(fetchClusterState());

        log.info("Moving buckets...");
        int moves = updateAssignments(sourceToAssignmentChanges);

        log.info("Bucket balancing finished. Moved %s buckets.", moves);
        return moves;
    }