Package com.asakusafw.vocabulary.flow.graph

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


        gen.defineOperator("op1", "in", "out", FlowBoundary.SHUFFLE);
        gen.definePseud("id");
        gen.defineOutput("out");
        gen.connect("in", "op1").connect("op1", "id").connect("id", "out");

        FlowGraph graph = gen.toGraph();
        getPlanner().reduceIdentities(graph);

        assertThat(FlowGraphUtil.collectElements(graph),
                is(gen.getAsSet("in", "op1", "out")));
View Full Code Here


        gen.defineOutput("out1");
        gen.defineOutput("out2");
        gen.connect("in", "op1").connect("op1", "id").connect("id", "out1");
        gen.connect("id", "out2");

        FlowGraph graph = gen.toGraph();
        getPlanner().normalizeFlowGraph(graph);

        assertThat(FlowGraphUtil.collectElements(graph),
                is(gen.getAsSet("in", "op1", "out1", "out2")));
View Full Code Here

        gen.defineInput("in");
        gen.defineFlowPart("c", comp.toGraph());
        gen.defineOutput("out");
        gen.connect("in", "c").connect("c.out1", "out").connect("c.out2", "out");

        FlowGraph graph = gen.toGraph();
        getPlanner().normalizeFlowGraph(graph);
        deletePseuds(graph);

        assertThat(succ(gen.get("in")), is(comp.get("op1")));
        assertThat(succ(comp.get("op1")), is(gen.get("out")));
View Full Code Here

    private static boolean rewrite(TracepointWeaver editor, FlowGraph graph) {
        boolean modify = false;
        LinkedList<FlowGraph> work = new LinkedList<FlowGraph>();
        work.add(graph);
        while (work.isEmpty() == false) {
            FlowGraph flow = work.removeFirst();
            Set<FlowElement> elements = FlowGraphUtil.collectElements(flow);
            for (FlowElement element : elements) {
                modify |= editor.edit(element);
                FlowElementDescription description = element.getDescription();
                if (description.getKind() == FlowElementKind.FLOW_COMPONENT) {
View Full Code Here

    private Map<String, String> attr() {
        return Collections.<String, String>emptyMap();
    }

    private FlowGraph rewrite(TraceSetting... settings) {
        FlowGraph graph = gen.toGraph();
        TracepointWeaveRewriter.rewrite(graph, Arrays.asList(settings));
        return graph;
    }
View Full Code Here

            File compileWorkDir = driverContext.getCompilerWorkingDirectory();
            if (compileWorkDir.exists()) {
                FileUtils.forceDelete(compileWorkDir);
            }

            FlowGraph flowGraph = flowDescriptionDriver.createFlowGraph(flowDescription);
            JobflowInfo jobflowInfo = DirectFlowCompiler.compile(flowGraph, batchId, flowId, "test.flowpart",
                    FlowPartDriverUtils.createWorkingLocation(driverContext), compileWorkDir,
                    Arrays.asList(new File[] { DirectFlowCompiler.toLibraryPath(flowDescription.getClass()) }),
                    flowDescription.getClass().getClassLoader(), driverContext.getOptions());
View Full Code Here

            File compileWorkDir = driverContext.getCompilerWorkingDirectory();
            if (compileWorkDir.exists()) {
                FileUtils.forceDelete(compileWorkDir);
            }

            FlowGraph flowGraph = jobFlowClass.getGraph();
            JobflowInfo jobflowInfo = DirectFlowCompiler.compile(
                flowGraph,
                batchId,
                flowId,
                "test.jobflow",
View Full Code Here

TOP

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

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.