Package com.facebook.presto.spi

Examples of com.facebook.presto.spi.Node


    private void assignSplits(AtomicInteger nextTaskId, Multimap<Node, Split> splitAssignment)
    {
        for (Entry<Node, Collection<Split>> taskSplits : splitAssignment.asMap().entrySet()) {
            long scheduleSplitStart = System.nanoTime();
            Node node = taskSplits.getKey();

            RemoteTask task = tasks.get(node);
            if (task == null) {
                scheduleTask(nextTaskId.getAndIncrement(), node, fragment.getPartitionedSource(), taskSplits.getValue());
View Full Code Here


            for (Split split : splits) {
                List<Node> candidateNodes = selectCandidateNodes(nodeMap.get().get(), split);
                checkState(!candidateNodes.isEmpty(), "No nodes available to run query");

                Node chosen = null;
                int min = Integer.MAX_VALUE;
                for (Node node : candidateNodes) {
                    RemoteTask task = taskMap.get(node);
                    int currentSplits = (task == null) ? 0 : task.getQueuedSplits();
                    int assignedSplits = currentSplits + assignment.get(node).size();
View Full Code Here

                        log.debug("Skipping Node %s, which is in the database but not active!", nodeIdentifier);
                        continue;
                    }

                    Iterable<Long> orphanedShards = shardManager.getOrphanedShardIds(Optional.of(nodeIdentifier));
                    Node node = activeNodes.get(nodeIdentifier);

                    for (Long shardId : orphanedShards) {
                        ListenableFutureTask<Void> task = ListenableFutureTask.create(new ShardDropJob(shardId, node), null);
                        nodeBoundedExecutor.execute(nodeIdentifier, task);
                        builder.add(task);
View Full Code Here

        for (Map.Entry<Node, RemoteTask> entry : tasks1.entrySet()) {
            assertEquals(entry.getValue().getQueuedSplits(), 5);
        }

        // Add new node
        Node additionalNode = new PrestoNode("other4", URI.create("http://127.0.0.1:14"), NodeVersion.UNKNOWN);
        nodeManager.addNode("foo", additionalNode);

        // Schedule next query
        SqlStageExecution sqlStageExecution2 = createSqlStageExecution(nodeScheduler, 2, 20);
        Future future2 = sqlStageExecution2.start();
View Full Code Here

        for (Map.Entry<Node, RemoteTask> entry : tasks1.entrySet()) {
            assertEquals(entry.getValue().getQueuedSplits(), 5);
        }

        // Add new node
        Node additionalNode = new PrestoNode("other4", URI.create("http://127.0.0.1:14"), NodeVersion.UNKNOWN);
        nodeManager.addNode("foo", additionalNode);

        // Schedule next query
        SqlStageExecution sqlStageExecution2 = createSqlStageExecution(nodeScheduler, 2, 20);
        Future future2 = sqlStageExecution2.start();
View Full Code Here

TOP

Related Classes of com.facebook.presto.spi.Node

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.