Package com.asakusafw.compiler.flow.plan

Examples of com.asakusafw.compiler.flow.plan.StageGraph


        Object shuffled = getShuffleValue(segment, sValue);
        assertThat(shuffled, is((Object) ex1));
    }

    private ShuffleModel shuffle(Class<? extends FlowDescription> aClass) {
        StageGraph graph = jfToStageGraph(aClass);
        assertThat(graph.getStages().size(), is(1));
        StageBlock target = graph.getStages().get(0);
        ShuffleAnalyzer analyzer = new ShuffleAnalyzer(environment);
        ShuffleModel analyzed = analyzer.analyze(target);
        assertThat(environment.hasError(), is(false));
        return analyzed;
    }
View Full Code Here


        Object r2 = getShuffleValue(seg2, value);
        assertThat(r2, is((Object) ex2));
    }

    private ShuffleModel shuffle(Class<? extends FlowDescription> aClass) {
        StageGraph graph = jfToStageGraph(aClass);
        assertThat(graph.getStages().size(), is(1));
        StageBlock target = graph.getStages().get(0);
        ShuffleAnalyzer analyzer = new ShuffleAnalyzer(environment);
        ShuffleModel analyzed = analyzer.analyze(target);
        assertThat(environment.hasError(), is(false));
        return analyzed;
    }
View Full Code Here

    /**
     * レデューサーのない単一ステージの解析。
     */
    @Test
    public void mapperOnly() {
        StageGraph graph = jfToStageGraph(NoShuffleStage.class);
        List<StageModel> stages = compileStages(graph);
        JobflowAnalyzer analyzer = new JobflowAnalyzer(environment);
        JobflowModel jobflow = analyzer.analyze(graph, stages);

        assertThat(jobflow.getStages().size(), is(1));
View Full Code Here

    /**
     * 単一ステージの解析。
     */
    @Test
    public void single() {
        StageGraph graph = jfToStageGraph(SimpleShuffleStage.class);
        List<StageModel> stages = compileStages(graph);
        JobflowAnalyzer analyzer = new JobflowAnalyzer(environment);
        JobflowModel jobflow = analyzer.analyze(graph, stages);

        assertThat(jobflow.getStages().size(), is(1));
View Full Code Here

    /**
     * 複数ステージの解析。
     */
    @Test
    public void multi() {
        StageGraph graph = jfToStageGraph(SequentialMultiStage.class);
        List<StageModel> stages = compileStages(graph);
        JobflowAnalyzer analyzer = new JobflowAnalyzer(environment);
        JobflowModel jobflow = analyzer.analyze(graph, stages);

        assertThat(jobflow.getStages().size(), is(2));
View Full Code Here

        assertThat(results.get(0).getValue(), is(300L));
        assertThat(results.get(0).getCount(), is(3L));
    }

    private StageModel mr(Class<? extends FlowDescription> aClass) throws IOException {
        StageGraph graph = jfToStageGraph(aClass);
        assertThat(graph.getStages().size(), is(1));
        StageBlock target = graph.getStages().get(0);
        StageAnalyzer analyzer = new StageAnalyzer(environment);
        StageModel analyzed = analyzer.analyze(target, compileShuffle(target));
        return analyzed;
    }
View Full Code Here

        p02 = part.getPartition(k, v, 100);
        assertThat(p01, not(p02));
    }

    private ShuffleModel shuffle(Class<? extends FlowDescription> aClass) {
        StageGraph graph = jfToStageGraph(aClass);
        assertThat(graph.getStages().size(), is(1));
        StageBlock target = graph.getStages().get(0);
        ShuffleAnalyzer analyzer = new ShuffleAnalyzer(environment);
        ShuffleModel analyzed = analyzer.analyze(target);
        return analyzed;
    }
View Full Code Here

    /**
     * Ex1 to Part (invalid).
     */
    @Test
    public void Ex1_Part() {
        StageGraph graph = jfToStageGraph(ExtendFlowInvalid.class);
        try {
            new StageCompiler(environment).compile(graph);
            assertThat(environment.hasError(), is(true));
        } catch (IOException e) {
            // ok
View Full Code Here

    /**
     * シャッフルが存在しない。
     */
    @Test
    public void nothing() {
        StageGraph graph = jfToStageGraph(NoShuffleStage.class);
        assertThat(graph.getStages().size(), is(1));
        StageBlock target = graph.getStages().get(0);

        ShuffleAnalyzer analyzer = new ShuffleAnalyzer(environment);
        ShuffleModel analyzed = analyzer.analyze(target);
        assertThat(analyzed, is(nullValue()));
    }
View Full Code Here

    /**
     * シャッフルが存在する。
     */
    @Test
    public void simple() {
        StageGraph graph = jfToStageGraph(SimpleShuffleStage.class);
        assertThat(graph.getStages().size(), is(1));
        StageBlock target = graph.getStages().get(0);

        ShuffleAnalyzer analyzer = new ShuffleAnalyzer(environment);
        ShuffleModel analyzed = analyzer.analyze(target);
        assertThat(analyzed, not(nullValue()));

View Full Code Here

TOP

Related Classes of com.asakusafw.compiler.flow.plan.StageGraph

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.