presto-raptor-legacy/src/main/java/io/prestosql/plugin/raptor/legacy/metadata/BucketReassigner.java/BucketReassigner/getNextReassignmentDestination
class BucketReassigner:    public String getNextReassignmentDestination()
    {
        if (!initialized) {
            for (String node : activeNodes) {
                nodeBucketCounts.put(node, 0);
            }
            for (BucketNode bucketNode : bucketNodes) {
                nodeBucketCounts.computeIfPresent(bucketNode.getNodeIdentifier(), (node, bucketCount) -> bucketCount + 1);
            }
            initialized = true;
        }

        String assignedNode;
        if (activeNodes.size() > 1) {
            assignedNode = randomTwoChoices();
        }
        else {
            assignedNode = activeNodes.get(0);
        }

        nodeBucketCounts.compute(assignedNode, (node, count) -> count + 1);
        return assignedNode;
    }