presto-main/src/main/java/io/prestosql/execution/scheduler/NodeAssignmentStats.java/NodeAssignmentStats/NodeAssignmentStats
class NodeAssignmentStats:    public NodeAssignmentStats(NodeTaskMap nodeTaskMap, NodeMap nodeMap, List<RemoteTask> existingTasks)
    {
        this.nodeTaskMap = requireNonNull(nodeTaskMap, "nodeTaskMap is null");

        // pre-populate the assignment counts with zeros. This makes getOrDefault() faster
        for (InternalNode node : nodeMap.getNodesByHostAndPort().values()) {
            assignmentCount.put(node, 0);
        }

        for (RemoteTask task : existingTasks) {
            checkArgument(queuedSplitCountByNode.put(task.getNodeId(), task.getQueuedPartitionedSplitCount()) == null, "A single stage may not have multiple tasks running on the same node");
        }
    }