Package com.asakusafw.vocabulary.flow.graph

Examples of com.asakusafw.vocabulary.flow.graph.FlowElementOutput


        Iterator<FlowElementInput> inputIterator = inputs.iterator();
        Iterator<FlowElementOutput> outputIterator = outputs.iterator();
        while (inputIterator.hasNext()) {
            assert outputIterator.hasNext();
            FlowElementInput input = inputIterator.next();
            FlowElementOutput output = outputIterator.next();
            bypass(input, output, attributes);
        }
        assert outputIterator.hasNext() == false;
    }
View Full Code Here


                            true,
                            true,
                            attributes);
                    FlowElementResolver resolver = new FlowElementResolver(desc);
                    FlowElementInput bypassIn = resolver.getInput(PseudElementDescription.INPUT_PORT_NAME);
                    FlowElementOutput bypassOut = resolver.getOutput(PseudElementDescription.OUTPUT_PORT_NAME);
                    PortConnection.connect(upstream, bypassIn);
                    PortConnection.connect(bypassOut, downstream);
                } else {
                    PortConnection.connect(upstream, downstream);
                }
View Full Code Here

        assert upstream != null;
        assert downstream != null;
        assert element.getDescription().getKind() == FlowElementKind.PSEUD;
        FlowElementResolver resolver = new FlowElementResolver(element.copy());
        FlowElementInput input = resolver.getInput(PseudElementDescription.INPUT_PORT_NAME);
        FlowElementOutput output = resolver.getOutput(PseudElementDescription.OUTPUT_PORT_NAME);
        PortConnection.connect(upstream, input);
        PortConnection.connect(output, downstream);
    }
View Full Code Here

        FlowElementInput insertIn =
            resolver.getInput(PseudElementDescription.INPUT_PORT_NAME);
        PortConnection.connect(output, insertIn);

        FlowElementOutput insertOut =
            resolver.getOutput(PseudElementDescription.OUTPUT_PORT_NAME);
        for (FlowElementInput downstream : originalDownstreams) {
            PortConnection.connect(insertOut, downstream);
        }
    }
View Full Code Here

        assert graph != null;
        for (Sink sink : stage.getStageResults()) {
            SimpleName name = names.create("output");
            FragmentNode node = new FragmentNode(Kind.OUTPUT, sink, name);
            for (FlowBlock.Output output : sink.getOutputs()) {
                FlowElementOutput target = output.getElementPort();
                List<FragmentNode> sources = nodes.get(target);
                if (sources == null) {
                    continue;
                }
                for (FragmentNode source : sources) {
View Full Code Here

            if (blockInput == null) {
                continue;
            }
            FragmentNode node = new FragmentNode(Kind.SHUFFLE, segment, names.create("shuffle"));
            for (FlowBlock.Connection conn : blockInput.getConnections()) {
                FlowElementOutput shuffleOut = conn.getUpstream().getElementPort();
                List<FragmentNode> sources = nodes.get(shuffleOut);
                if (sources == null) {
                    continue;
                }
                for (FragmentNode source : sources) {
View Full Code Here

    private void insertCheckpointsWithPushDown(FlowElementOutput start) {
        assert start != null;
        LinkedList<FlowElementOutput> work = new LinkedList<FlowElementOutput>();
        work.add(start);
        while (work.isEmpty() == false) {
            FlowElementOutput output = work.removeFirst();
            if (isSuccessShuffleBoundary(output) == false) {
                continue;
            }
            Set<PortConnection> connections = output.getConnected();
            if (connections.size() != 1) {
                LOG.debug("Inserts checkpoint after {}", output);
                FlowGraphUtil.insertCheckpoint(output);
                continue;
            }
View Full Code Here

        Source<CharSequence> op = (Source<CharSequence>) access(example, "out");

        MockOut<CharSequence> out = new MockOut<CharSequence>(CharSequence.class, "out");
        out.add(op);

        FlowElementOutput port = op.toOutputPort();
        FlowElement element = port.getOwner();
        OperatorDescription desc = (OperatorDescription) element.getDescription();
        List<Parameter> params = desc.getParameters();
        assertThat(params.size(), is(1));
        assertThat(params.get(0).getName(), is("param"));
        assertThat(params.get(0).getType(), is((Type) int.class));
View Full Code Here

        for (FlowBlock.Input blockInput : block.getBlockInputs()) {
            FlowElement element = blockInput.getElementPort().getOwner();
            if (FlowGraphUtil.isIdentity(element) == false) {
                continue;
            }
            FlowElementOutput output = element.getOutputPorts().get(0);
            FlowBlock.Output blockOutput = outputs.get(output);
            if (blockOutput == null) {
                continue;
            }
View Full Code Here

        List<FlowElementOutput> originalOutputs = element.getOutputPorts();
        List<FlowElementOutput> rewriteOutputs = rewrite.getOutputPorts();
        assert originalOutputs.size() == rewriteOutputs.size();
        for (int i = 0, n = originalOutputs.size(); i < n; i++) {
            FlowElementOutput originalPort = originalOutputs.get(i);
            FlowElementOutput rewritePort = rewriteOutputs.get(i);
            for (FlowElementInput downstream : originalPort.getOpposites()) {
                PortConnection.connect(rewritePort, downstream);
            }
        }
View Full Code Here

TOP

Related Classes of com.asakusafw.vocabulary.flow.graph.FlowElementOutput

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.