Examples of PlanNodeId


Examples of com.facebook.presto.sql.planner.plan.PlanNodeId

    private final ConcurrentMap<PlanNodeId, TaskSource> sources = new ConcurrentHashMap<>();

    public synchronized void updateSource(TaskSource source)
    {
        // does this driver have an operator for the specified source?
        PlanNodeId sourceId = source.getPlanNodeId();
        if (!sourceOperators.containsKey(sourceId)) {
            return;
        }

        // create new source
View Full Code Here

Examples of com.facebook.presto.sql.planner.plan.PlanNodeId

        // don't update maxAcknowledgedSplit until the end because task sources may not
        // be in sorted order and if we updated early we could skip splits
        long newMaxAcknowledgedSplit = maxAcknowledgedSplit;

        for (TaskSource source : sources) {
            PlanNodeId sourceId = source.getPlanNodeId();
            if (sourceId.equals(partitionedSourceId)) {
                // partitioned split
                ImmutableList.Builder<DriverSplitRunner> runners = ImmutableList.builder();
                for (ScheduledSplit scheduledSplit : source.getSplits()) {
                    // only add a split if we have not already scheduled it
                    if (scheduledSplit.getSequenceId() > maxAcknowledgedSplit) {
View Full Code Here

Examples of com.facebook.presto.sql.planner.plan.PlanNodeId

            return null;
        }

        private void verifyUniqueId(PlanNode node)
        {
            PlanNodeId id = node.getId();
            Preconditions.checkArgument(!nodesById.containsKey(id), "Duplicate node id found %s between %s and %s", node.getId(), node, nodesById.get(id));

            nodesById.put(id, node);
        }
View Full Code Here

Examples of com.facebook.presto.sql.planner.plan.PlanNodeId

            errorCount.set(0);
            errorsSinceLastSuccess.clear();

            // remove acknowledged splits, which frees memory
            for (TaskSource source : sources) {
                PlanNodeId planNodeId = source.getPlanNodeId();
                for (ScheduledSplit split : source.getSplits()) {
                    pendingSplits.remove(planNodeId, split);
                }
            }
View Full Code Here

Examples of com.facebook.presto.sql.planner.plan.PlanNodeId

            errorCount.set(0);
            errorsSinceLastSuccess.clear();

            // remove acknowledged splits, which frees memory
            for (TaskSource source : sources) {
                PlanNodeId planNodeId = source.getPlanNodeId();
                for (ScheduledSplit split : source.getSplits()) {
                    pendingSplits.remove(planNodeId, split);
                }
            }
View Full Code Here

Examples of com.facebook.presto.sql.planner.plan.PlanNodeId

            errorCount.set(0);
            errorsSinceLastSuccess.clear();

            // remove acknowledged splits, which frees memory
            for (TaskSource source : sources) {
                PlanNodeId planNodeId = source.getPlanNodeId();
                for (ScheduledSplit split : source.getSplits()) {
                    pendingSplits.remove(planNodeId, split);
                }
            }
View Full Code Here

Examples of com.facebook.presto.sql.planner.plan.PlanNodeId

        waitForFinished(operator);
    }

    private SourceOperator createExchangeOperator()
    {
        ExchangeOperatorFactory operatorFactory = new ExchangeOperatorFactory(0, new PlanNodeId("test"), exchangeClientSupplier, TYPES);

        ConnectorSession session = new ConnectorSession("user", "source", "catalog", "schema", UTC_KEY, Locale.ENGLISH, "address", "agent");
        DriverContext driverContext = new TaskContext(new TaskId("query", "stage", "task"), executor, session)
                .addPipelineContext(true, true)
                .addDriverContext();
View Full Code Here

Examples of com.facebook.presto.sql.planner.plan.PlanNodeId

    {
        // create table scan for build data with a single split, so it is only waiting on the no-more buffers call
        StageExecutionPlan build = createTableScanPlan("build", metadata, 1);

        // create an exchange to read the build data
        ExchangeNode buildExchange = new ExchangeNode(new PlanNodeId(planId + "-build"),
                build.getFragment().getId(),
                ImmutableList.copyOf(build.getFragment().getSymbols().keySet()));

        // create table scan for probe data with three splits, so it will not send the no-more buffers call
        StageExecutionPlan probe = createTableScanPlan("probe", metadata, 10);

        // create an exchange to read the probe data
        ExchangeNode probeExchange = new ExchangeNode(new PlanNodeId(planId + "-probe"),
                probe.getFragment().getId(),
                ImmutableList.copyOf(probe.getFragment().getSymbols().keySet()));

        // join build and probe
        PlanFragment joinPlan = new PlanFragment(
                new PlanFragmentId(planId),
                new JoinNode(new PlanNodeId(planId), JoinNode.Type.INNER, probeExchange, buildExchange, ImmutableList.<EquiJoinClause>of()),
                probe.getFragment().getSymbols(), // this is wrong, but it works
                PlanDistribution.SOURCE,
                new PlanNodeId(planId),
                OutputPartitioning.NONE,
                ImmutableList.<Symbol>of());

        return new StageExecutionPlan(joinPlan,
                probe.getDataSource(),
View Full Code Here

Examples of com.facebook.presto.sql.planner.plan.PlanNodeId

        TableHandle tableHandle = metadata.getTableHandle(SESSION, new QualifiedTableName("default", "default", DualMetadata.NAME)).get();
        ColumnHandle columnHandle = metadata.getColumnHandle(tableHandle, DualMetadata.COLUMN_NAME).get();
        Symbol symbol = new Symbol(DualMetadata.COLUMN_NAME);

        // table scan with splitCount splits
        PlanNodeId tableScanNodeId = new PlanNodeId(planId);
        PlanFragment testFragment = new PlanFragment(
                new PlanFragmentId(planId),
                new TableScanNode(
                        tableScanNodeId,
                        tableHandle,
View Full Code Here

Examples of com.facebook.presto.sql.planner.plan.PlanNodeId

    }

    @Test
    public void testAddSourceFinish()
    {
        PlanNodeId sourceId = new PlanNodeId("source");
        TableScanOperator source = new TableScanOperator(driverContext.addOperatorContext(99, "values"),
                sourceId,
                new DataStreamProvider()
                {
                    @Override
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.