Package io.crate.planner.node.dql

Examples of io.crate.planner.node.dql.FileUriCollectNode


        }

        Routing routing = new Routing(
                ImmutableMap.<String, Map<String, Set<Integer>>>of("dummyNodeId", new HashMap<String, Set<Integer>>())
        );
        FileUriCollectNode collectNode = new FileUriCollectNode(
                "test",
                routing,
                Literal.newLiteral(tmpFile.getAbsolutePath()),
                Arrays.<Symbol>asList(
                        createReference("name", DataTypes.STRING),
View Full Code Here


    @Override
    public void readFrom(StreamInput in) throws IOException {
        super.readFrom(in);
        if (in.readBoolean()) {
            collectNode = new FileUriCollectNode();
        } else {
            collectNode = new CollectNode();
        }
        collectNode.readFrom(in);
    }
View Full Code Here

    private CrateCollector getCollector(CollectNode collectNode,
                                        FlatProjectorChain projectorChain) throws Exception {
        if (collectNode instanceof FileUriCollectNode) {
            FileCollectInputSymbolVisitor.Context context = fileInputSymbolVisitor.process(collectNode);
            FileUriCollectNode fileUriCollectNode = (FileUriCollectNode) collectNode;

            String[] readers = fileUriCollectNode.executionNodes().toArray(
                    new String[fileUriCollectNode.executionNodes().size()]);
            Arrays.sort(readers);
            return new FileReadingCollector(
                    StringValueSymbolVisitor.INSTANCE.process(fileUriCollectNode.targetUri()),
                    context.topLevelInputs(),
                    context.expressions(),
                    projectorChain.firstProjector(),
                    fileUriCollectNode.fileFormat(),
                    fileUriCollectNode.compression(),
                    ImmutableMap.<String, FileInputFactory>of(),
                    fileUriCollectNode.sharedStorage(),
                    readers.length,
                    Arrays.binarySearch(readers, clusterService.localNode().id())
            );
        } else {
            CollectService service = collectServiceResolver.getService(collectNode.routing());
View Full Code Here

TOP

Related Classes of io.crate.planner.node.dql.FileUriCollectNode

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.