presto-raptor-legacy/src/main/java/io/prestosql/plugin/raptor/legacy/RaptorNodePartitioningProvider.java/RaptorNodePartitioningProvider/getBucketNodeMap
class RaptorNodePartitioningProvider:    @Override
    public ConnectorBucketNodeMap getBucketNodeMap(ConnectorTransactionHandle transaction, ConnectorSession session, ConnectorPartitioningHandle partitioning)
    {
        RaptorPartitioningHandle handle = (RaptorPartitioningHandle) partitioning;

        Map<String, Node> nodesById = uniqueIndex(nodeSupplier.getWorkerNodes(), Node::getNodeIdentifier);

        ImmutableList.Builder<Node> bucketToNode = ImmutableList.builder();
        for (String nodeIdentifier : handle.getBucketToNode()) {
            Node node = nodesById.get(nodeIdentifier);
            if (node == null) {
                throw new PrestoException(NO_NODES_AVAILABLE, "Node for bucket is offline: " + nodeIdentifier);
            }
            bucketToNode.add(node);
        }
        return createBucketNodeMap(bucketToNode.build());
    }