Examples of FlowDescriptionDriver


Examples of com.asakusafw.compiler.flow.FlowDescriptionDriver

    /**
     * invalid output format.
     */
    @Test
    public void inconsistent_output_format() {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Line1> in = flow.createIn("in1", new Input(format, "input", "input.txt"));
        Out<Line1> out = flow.createOut("out1",
                new Output(Line1.class, VoidFormat.class, "output", "output.txt", "position"));

        FlowDescription desc = new IdentityFlow<Line1>(in, out);
        JobflowInfo info = compile(flow, desc);
        assertThat(info, is(nullValue()));
View Full Code Here

Examples of com.asakusafw.compiler.flow.FlowDescriptionDriver

    /**
     * conflict input and output.
     */
    @Test
    public void input_conflict_output() {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Line1> in = flow.createIn("in1", new Input(format, "path/conflict", "input.txt"));
        Out<Line1> out = flow.createOut("out1", new Output(format, "path/conflict", "output.txt"));

        FlowDescription desc = new IdentityFlow<Line1>(in, out);
        JobflowInfo info = compile(flow, desc);
        assertThat(info, is(nullValue()));
    }
View Full Code Here

Examples of com.asakusafw.compiler.flow.FlowDescriptionDriver

    /**
     * input contains other output (allowed).
     */
    @Test
    public void input_contains_output() {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Line1> in = flow.createIn("in1", new Input(format, "conflict", "input.txt"));
        Out<Line1> out = flow.createOut("out1", new Output(format, "conflict/output", "output.txt"));

        FlowDescription desc = new IdentityFlow<Line1>(in, out);
        JobflowInfo info = compile(flow, desc);
        assertThat(info, is(not(nullValue())));
    }
View Full Code Here

Examples of com.asakusafw.compiler.flow.FlowDescriptionDriver

    /**
     * conflict input and output.
     */
    @Test
    public void output_contains_input() {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Line1> in = flow.createIn("in1", new Input(format, "conflict/input", "input.txt"));
        Out<Line1> out = flow.createOut("out1", new Output(format, "conflict", "output.txt"));

        FlowDescription desc = new IdentityFlow<Line1>(in, out);
        JobflowInfo info = compile(flow, desc);
        assertThat(info, is(nullValue()));
    }
View Full Code Here

Examples of com.asakusafw.compiler.flow.FlowDescriptionDriver

    /**
     * conflict between outputs.
     */
    @Test
    public void output_conflict_output() {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Line1> in1 = flow.createIn("in1", new Input(format, "input", "input-1.txt"));
        In<Line1> in2 = flow.createIn("in2", new Input(format, "input", "input-2.txt"));
        Out<Line1> out1 = flow.createOut("out1", new Output(format, "conflict", "output.txt"));
        Out<Line1> out2 = flow.createOut("out2", new Output(format, "conflict", "output.txt"));

        FlowDescription desc = new DualIdentityFlow<Line1, Line1>(in1, in2, out1, out2);
        JobflowInfo info = compile(flow, desc);
        assertThat(info, is(nullValue()));
    }
View Full Code Here

Examples of com.asakusafw.compiler.flow.FlowDescriptionDriver

    /**
     * outputs has the common prefix (allowed).
     */
    @Test
    public void output_common_prefix() {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Line1> in1 = flow.createIn("in1", new Input(format, "input", "input-1.txt"));
        In<Line1> in2 = flow.createIn("in2", new Input(format, "input", "input-2.txt"));
        Out<Line1> out1 = flow.createOut("out1", new Output(format, "conflict/a", "output.txt"));
        Out<Line1> out2 = flow.createOut("out2", new Output(format, "conflict/aa", "output.txt"));

        FlowDescription desc = new DualIdentityFlow<Line1, Line1>(in1, in2, out1, out2);
        JobflowInfo info = compile(flow, desc);
        assertThat(info, is(not(nullValue())));
    }
View Full Code Here

Examples of com.asakusafw.compiler.flow.FlowDescriptionDriver

    /**
     * conflict between outputs.
     */
    @Test
    public void output_contains_output() {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Line1> in1 = flow.createIn("in1", new Input(format, "input", "input-1.txt"));
        In<Line1> in2 = flow.createIn("in2", new Input(format, "input", "input-2.txt"));
        Out<Line1> out1 = flow.createOut("out1", new Output(format, "conflict", "output.txt"));
        Out<Line1> out2 = flow.createOut("out2", new Output(format, "conflict/internal", "output.txt"));

        FlowDescription desc = new DualIdentityFlow<Line1, Line1>(in1, in2, out1, out2);
        JobflowInfo info = compile(flow, desc);
        assertThat(info, is(nullValue()));
    }
View Full Code Here

Examples of com.asakusafw.compiler.flow.FlowDescriptionDriver

        } else {
            driver = HadoopDriver.createInstance(configurations);
        }
        this.hadoopDriver = driver;
        this.frameworkDeployer = new FrameworkDeployer(createFramework);
        this.flow = new FlowDescriptionDriver();
        this.testClass = getClass();
        this.testName = "unknown";
        this.variables = new VariableTable(RedefineStrategy.ERROR);
        this.options = new FlowCompilerOptions();
        this.libraries = new ArrayList<File>();
View Full Code Here

Examples of com.asakusafw.compiler.flow.FlowDescriptionDriver

    /**
     * simple.
     */
    @Test
    public void validate() {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Line1> in = flow.createIn("in1", new Input(format, "input", "input.txt"));
        Out<Line1> out = flow.createOut("out1", new Output(format, "output", "output.txt"));

        FlowDescription desc = new IdentityFlow<Line1>(in, out);
        JobflowInfo info = compile(flow, desc);
        assertThat(info, is(not(nullValue())));
    }
View Full Code Here

Examples of com.asakusafw.compiler.flow.FlowDescriptionDriver

    /**
     * dual inputs and outputs.
     */
    @Test
    public void validate_dual() {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Line1> in1 = flow.createIn("in1",
                new Input(Line1.class, format, "input", "input-1.txt", DataSize.LARGE));
        In<Line2> in2 = flow.createIn("in2",
                new Input(Line2.class, format, "input", "input-2.txt", DataSize.TINY));
        Out<Line1> out1 = flow.createOut("out1",
                new Output(Line1.class, format, "output-1", "output.txt"));
        Out<Line2> out2 = flow.createOut("out2",
                new Output(Line2.class, format, "output-2", "output.txt"));

        FlowDescription desc = new DualIdentityFlow<Line1, Line2>(in1, in2, out1, out2);
        JobflowInfo info = compile(flow, desc);
        assertThat(info, is(not(nullValue())));
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.