Examples of downStreamNodes()


Examples of io.crate.planner.node.dql.CollectNode.downStreamNodes()

    public void testStreaming() throws Exception {

        CollectNode cn = new CollectNode("cn");
        cn.maxRowGranularity(RowGranularity.DOC);

        cn.downStreamNodes(ImmutableList.of("n1", "n2"));
        cn.toCollect(ImmutableList.<Symbol>of(new Value(DataTypes.STRING)));


        BytesStreamOutput out = new BytesStreamOutput();
        cn.writeTo(out);
View Full Code Here

Examples of io.crate.planner.node.dql.CollectNode.downStreamNodes()

        CollectNode cn2 = new CollectNode();
        cn2.readFrom(in);
        assertEquals(cn, cn2);

        assertEquals(cn.toCollect(), cn2.toCollect());
        assertEquals(cn.downStreamNodes(), cn2.downStreamNodes());
        assertEquals(cn.maxRowGranularity(), cn.maxRowGranularity());

    }

    @Test
View Full Code Here

Examples of io.crate.planner.node.dql.CollectNode.downStreamNodes()

    public void testStreamingWithJobId() throws Exception {

        CollectNode cn = new CollectNode("cn");
        cn.maxRowGranularity(RowGranularity.DOC);

        cn.downStreamNodes(ImmutableList.of("n1", "n2"));
        cn.toCollect(ImmutableList.<Symbol>of(new Value(DataTypes.STRING)));
        cn.jobId(UUID.randomUUID());

        BytesStreamOutput out = new BytesStreamOutput();
        cn.writeTo(out);
View Full Code Here

Examples of io.crate.planner.node.dql.CollectNode.downStreamNodes()

        CollectNode cn2 = new CollectNode();
        cn2.readFrom(in);
        assertEquals(cn, cn2);

        assertEquals(cn.toCollect(), cn2.toCollect());
        assertEquals(cn.downStreamNodes(), cn2.downStreamNodes());
        assertEquals(cn.maxRowGranularity(), cn.maxRowGranularity());
    }
}
View Full Code Here

Examples of io.crate.planner.node.dql.CollectNode.downStreamNodes()

        }).when(transportService).submitRequest(any(DiscoveryNode.class), Matchers.same(TransportMergeNodeAction.mergeRowsAction),
                Matchers.<TransportRequest>any(),
                any(TransportResponseHandler.class));

        CollectNode collectNode = new CollectNode("dcollect", shardRouting(0, 1));
        collectNode.downStreamNodes(Arrays.asList(TEST_NODE_ID, OTHER_NODE_ID));
        collectNode.jobId(jobId);
        collectNode.maxRowGranularity(RowGranularity.SHARD);
        collectNode.toCollect(Arrays.<Symbol>asList(testShardIdReference));

View Full Code Here

Examples of io.crate.planner.node.dql.CollectNode.downStreamNodes()

        Mockito.doReturn(null).when(transportService).submitRequest(any(DiscoveryNode.class), Matchers.same(TransportMergeNodeAction.mergeRowsAction),
                Matchers.<TransportRequest>any(),
                any(TransportResponseHandler.class));

        CollectNode collectNode = new CollectNode("dcollect", nodeRouting);
        collectNode.downStreamNodes(Arrays.asList(TEST_NODE_ID, OTHER_NODE_ID));
        collectNode.jobId(jobId);
        collectNode.maxRowGranularity(RowGranularity.NODE);
        collectNode.toCollect(Arrays.<Symbol>asList(Literal.newLiteral(true)));
        Object[][] objects = operation.collect(collectNode).get();
        assertThat((Boolean) objects[0][0], is(true));
View Full Code Here

Examples of io.crate.planner.node.dql.CollectNode.downStreamNodes()

        }).when(transportService).submitRequest(any(DiscoveryNode.class), Matchers.same(TransportMergeNodeAction.mergeRowsAction),
                Matchers.<TransportRequest>any(),
                any(TransportResponseHandler.class));

        CollectNode collectNode = new CollectNode("collect all the things", shardRouting(0, 1));
        collectNode.downStreamNodes(Arrays.asList(TEST_NODE_ID, OTHER_NODE_ID));
        collectNode.jobId(jobId);
        collectNode.maxRowGranularity(RowGranularity.SHARD);
        collectNode.toCollect(Arrays.<Symbol>asList(testShardIdReference));

        collectNode.whereClause(new WhereClause(new Function(
View Full Code Here

Examples of io.crate.planner.node.dql.CollectNode.downStreamNodes()

                                           List<String> downstreamNodes,
                                           ImmutableList<Projection> projections) {
        CollectNode node = new CollectNode("distributing collect", analysis.table().getRouting(analysis.whereClause()));
        node.whereClause(analysis.whereClause());
        node.maxRowGranularity(analysis.rowGranularity());
        node.downStreamNodes(downstreamNodes);
        node.toCollect(toCollect);
        node.projections(projections);

        node.isPartitioned(analysis.table().isPartitioned());
        setOutputTypes(node);
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.