Examples of PlanNodeId


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 exchangeNode = 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);

        // join build and probe
        PlanFragment joinPlan = new PlanFragment(new PlanFragmentId(planId),
                new PlanNodeId(planId),
                probe.getFragment().getSymbols(), // this is wrong, but it works
                new JoinNode(new PlanNodeId(planId), JoinNode.Type.INNER, probe.getFragment().getRoot(), exchangeNode, ImmutableList.<EquiJoinClause>of()));

        return new StageExecutionPlan(joinPlan,
                probe.getDataSource(),
                ImmutableList.<StageExecutionPlan>of(build),
                ImmutableMap.<PlanNodeId, OutputReceiver>of());
View Full Code Here

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

        ColumnHandle columnHandle = metadata.getColumnHandle(tableHandle, DualMetadata.COLUMN_NAME).get();
        Symbol symbol = new Symbol(DualMetadata.COLUMN_NAME);

        // table scan with 3 splits
        Split split = new DualSplit(HostAddress.fromString("127.0.0.1"));
        PlanNodeId tableScanNodeId = new PlanNodeId(planId);
        PlanFragment testFragment = new PlanFragment(new PlanFragmentId(planId),
                tableScanNodeId,
                ImmutableMap.<Symbol, Type>of(symbol, Type.VARCHAR),
                new TableScanNode(tableScanNodeId,
                        tableHandle, ImmutableList.of(symbol),
View Full Code Here

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

                new MockLocationFactory(),
                taskExecutor,
                new QueryMonitor(new ObjectMapperProvider().get(), new NullEventClient(), new NodeInfo("test")),
                new TaskManagerConfig());

        tableScanNodeId = new PlanNodeId("tableScan");
        testFragment = new PlanFragment(new PlanFragmentId("fragment"),
                tableScanNodeId,
                ImmutableMap.<Symbol, Type>of(symbol, Type.VARCHAR),
                new TableScanNode(tableScanNodeId, tableHandle, ImmutableList.of(symbol), ImmutableMap.of(symbol, columnHandle), TRUE_LITERAL, TRUE_LITERAL));
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);

        DriverContext driverContext = new TaskContext(new TaskId("query", "stage", "task"), executor, TEST_SESSION)
                .addPipelineContext(true, true)
                .addDriverContext();
View Full Code Here

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

    public RemoteTask createTableScanTask(Node newNode, List<Split> splits)
    {
        TaskId taskId = new TaskId(new StageId("test", "1"), "1");
        Symbol symbol = new Symbol("column");
        PlanNodeId tableScanNodeId = new PlanNodeId("test");
        PlanNodeId sourceId = new PlanNodeId("sourceId");
        PlanFragment testFragment = new PlanFragment(
                new PlanFragmentId("test"),
                new TableScanNode(
                        new PlanNodeId("test"),
                        new TableHandle("test", new TestingTableHandle()),
                        ImmutableList.of(symbol),
                        ImmutableMap.of(symbol, new ColumnHandle("test", new TestingColumnHandle("column"))),
                        null,
                        Optional.<TableScanNode.GeneratedPartitions>absent()),
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", 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", 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

    private StageExecutionPlan createTableScanPlan(String planId, int splitCount)
    {
        Symbol symbol = new Symbol("column");

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

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

    }

    @Test
    public void testAddSourceFinish()
    {
        PlanNodeId sourceId = new PlanNodeId("source");
        final List<Type> types = ImmutableList.<Type>of(VARCHAR, BIGINT, BIGINT);
        TableScanOperator source = new TableScanOperator(driverContext.addOperatorContext(99, "values"),
                sourceId,
                new PageSourceProvider()
                {
View Full Code Here

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

    @Test
    public void testBrokenOperatorAddSource()
            throws Exception
    {
        PlanNodeId sourceId = new PlanNodeId("source");
        final List<Type> types = ImmutableList.<Type>of(VARCHAR, BIGINT, BIGINT);
        // create a table scan operator that does not block, which will cause the driver loop to busy wait
        TableScanOperator source = new NotBlockedTableScanOperator(driverContext.addOperatorContext(99, "values"),
                sourceId,
                new PageSourceProvider()
View Full Code Here

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

            if (!splits.isEmpty() || noMoreSplits) {
                sources.add(new TaskSource(planFragment.getPartitionedSource(), splits, noMoreSplits));
            }
        }
        for (PlanNode planNode : planFragment.getSources()) {
            PlanNodeId planNodeId = planNode.getId();
            if (!planNodeId.equals(planFragment.getPartitionedSource())) {
                Set<ScheduledSplit> splits = pendingSplits.get(planNodeId);
                if (!splits.isEmpty() || noMoreExchangeLocations) {
                    sources.add(new TaskSource(planNodeId, splits, noMoreExchangeLocations));
                }
            }
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.