Examples of FlowElement


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

        LOG.debug("入力を解析しています({})", graph.getInput());

        Set<InputDescription> saw = Sets.create();
        List<Import> results = Lists.create();
        for (FlowBlock.Output source : graph.getInput().getBlockOutputs()) {
            FlowElement element = source.getElementPort().getOwner();
            FlowElementDescription desc = element.getDescription();
            if (desc.getKind() != FlowElementKind.INPUT) {
                error("{0}は入力を表現していません", desc);
                continue;
            }
            InputDescription description = (InputDescription) desc;
View Full Code Here

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

        assert stageModels != null;
        LOG.debug("出力を解析しています({})", graph.getOutput());

        List<Export> results = Lists.create();
        for (FlowBlock.Input target : graph.getOutput().getBlockInputs()) {
            FlowElement element = target.getElementPort().getOwner();
            FlowElementDescription desc = element.getDescription();
            if (desc.getKind() != FlowElementKind.OUTPUT) {
                error("{0}は出力を表現していません", desc);
                continue;
            }
            OutputDescription description = (OutputDescription) desc;
View Full Code Here

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

        assert elements != null;
        LOG.debug("シャッフルへの各セグメントを分析しています");

        List<ShuffleModel.Segment> segments = Lists.create();
        for (int elementId = 0, n = elements.size(); elementId < n; elementId++) {
            FlowElement element = elements.get(elementId);
            FlowElementDescription description = element.getDescription();
            RendezvousProcessor proc = environment.getProcessors()
                .findRendezvousProcessor(description);
            if (proc == null) {
                error("{0}に対する{1}が見つかりませんでした",
                        description,
                        FlowElementProcessor.class.getName());
                continue;
            }

            List<ShuffleModel.Segment> segmentsInElement = Lists.create();
            LOG.debug("{}は{}を使ってシャッフルの情報を分析します", element, proc);
            for (FlowElementInput input : element.getInputPorts()) {
                ShuffleDescription desc = extractDescription(proc, input);
                ShuffleModel.Segment segment = resolveDescription(
                        elementId,
                        segments.size() + segmentsInElement.size() + 1,
                        input,
View Full Code Here

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

        List<FlowElement> results = Lists.create();
        Set<FlowElement> saw = Sets.create();
        for (FlowBlock reducer : reduceBlocks) {
            for (FlowBlock.Input input : reducer.getBlockInputs()) {
                FlowElement rendezvous = input.getElementPort().getOwner();
                if (saw.contains(rendezvous)) {
                    continue;
                }
                LOG.debug("{}の{}は待ち合わせ要素です", reducer, rendezvous);
                saw.add(rendezvous);
View Full Code Here

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

     * 指定の名前を有する要素を返す。
     * @param name 対象の名前
     * @return 発見した要素
     */
    public FlowElement get(String name) {
        FlowElement found = elements.get(name);
        if (found == null) {
            throw new AssertionError(name + elements.keySet());
        }
        return found;
    }
View Full Code Here

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

     * 指定の名前を有する要素を返す。
     * @param name 対象の名前
     * @return 発見した要素
     */
    public FlowElementDescription desc(String name) {
        FlowElement found = elements.get(name);
        if (found == null) {
            throw new AssertionError(name + elements.keySet());
        }
        return found.getDescription();
    }
View Full Code Here

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

        Matcher matcher = PORT.matcher(spec);
        if (matcher.matches() == false) {
            throw new AssertionError(spec);
        }
        String elementName = matcher.group(1);
        FlowElement element = elements.get(elementName);
        if (element == null) {
            throw new AssertionError(elementName + elements.keySet());
        }

        String portName = matcher.group(3);
        if (portName == null) {
            if (element.getInputPorts().size() != 1) {
                throw new AssertionError(element.getInputPorts());
            }
            return element.getInputPorts().get(0);
        }

        FlowElementInput port = null;
        for (FlowElementInput finding : element.getInputPorts()) {
            if (portName.equals(finding.getDescription().getName())) {
                port = finding;
                break;
            }
        }
View Full Code Here

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

        Matcher matcher = PORT.matcher(spec);
        if (matcher.matches() == false) {
            throw new AssertionError(spec);
        }
        String elementName = matcher.group(1);
        FlowElement element = elements.get(elementName);
        if (element == null) {
            throw new AssertionError(elementName + elements.keySet());
        }

        String portName = matcher.group(3);
        if (portName == null) {
            if (element.getOutputPorts().size() != 1) {
                throw new AssertionError(element.getOutputPorts());
            }
            return element.getOutputPorts().get(0);
        }

        FlowElementOutput port = null;
        for (FlowElementOutput finding : element.getOutputPorts()) {
            if (portName.equals(finding.getDescription().getName())) {
                port = finding;
                break;
            }
        }
View Full Code Here

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

        }
        return port;
    }

    private FlowElement register(String name, FlowElementDescription desc) {
        FlowElement element = new FlowElement(desc);
        return register(name, element);
    }
View Full Code Here

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

        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));
        assertThat(params.get(0).getValue(), is((Object) 5));
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.