Examples of FlowDescriptionDriver


Examples of com.asakusafw.compiler.flow.FlowDescriptionDriver

    /**
     * output deletion.
     */
    @Test
    public void validate_output_delete() {
        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")
            .delete("**"));

        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

    /**
     * output deletion.
     */
    @Test
    public void validate_output_complexdelete() {
        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")
            .delete("*.txt").delete("*.csv"));

        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

    /**
     * invalid input base-path.
     */
    @Test
    public void invalid_input_basePath_wildcard() {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Line1> in = flow.createIn(
                "in1",
                new Input(Line1.class, format, "input/*", "input.txt", DataSize.UNKNOWN));
        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(nullValue()));
    }
View Full Code Here

Examples of com.asakusafw.compiler.flow.FlowDescriptionDriver

    /**
     * invalid input resource.
     */
    @Test
    public void invalid_input_resource() {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Line1> in = flow.createIn(
                "in1",
                new Input(Line1.class, format, "input", "?", DataSize.UNKNOWN));
        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(nullValue()));
    }
View Full Code Here

Examples of com.asakusafw.compiler.flow.FlowDescriptionDriver

    /**
     * invalid input format.
     */
    @Test
    public void no_input_format() {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Line1> in = flow.createIn(
                "in1",
                new Input(Line1.class, null, "input", "*", DataSize.UNKNOWN));
        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(nullValue()));
    }
View Full Code Here

Examples of com.asakusafw.compiler.flow.FlowDescriptionDriver

    /**
     * invalid input format.
     */
    @Test
    public void invalid_input_format() {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Line1> in = flow.createIn(
                "in1",
                new Input(Line1.class, PrivateFormat.class, "input", "*", DataSize.UNKNOWN));
        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(nullValue()));
    }
View Full Code Here

Examples of com.asakusafw.compiler.flow.FlowDescriptionDriver

    /**
     * invalid input format.
     */
    @Test
    public void inconsistent_input_format() {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Line1> in = flow.createIn(
                "in1",
                new Input(Line1.class, VoidFormat.class, "input", "*", DataSize.UNKNOWN));
        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(nullValue()));
    }
View Full Code Here

Examples of com.asakusafw.compiler.flow.FlowDescriptionDriver

    /**
     * invalid output base-path.
     */
    @Test
    public void invalid_output_basePath_wildcard() {
        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, format, "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

     * 正常系。
     * @throws Exception 例外が発生した場合
     */
    @Test
    public void ok() throws Exception {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Ex1> in1 = flow.createIn("in1", new Import(Mode.PRIMARY, "default", LockType.ROW));
        In<Ex1> in2 = flow.createIn("in2", new Import(Mode.PRIMARY, "default", LockType.ROW_OR_SKIP));
        Out<Ex1> out1 = flow.createOut("out1", new Export("default"));
        Out<Ex1> out2 = flow.createOut("out2", new Export("default"));
        FlowDescription desc = new DualIdentityFlow<Ex1>(in1, in2, out1, out2);

        JobflowInfo info = compile(flow, desc);
        assertThat(info, not(nullValue()));
        List<ExternalIoCommandProvider> commands = info.getCommandProviders();
View Full Code Here

Examples of com.asakusafw.compiler.flow.FlowDescriptionDriver

     * 重複チェックつき。
     * @throws Exception 例外が発生した場合
     */
    @Test
    public void dupCheck() throws Exception {
        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Ex1> in = flow.createIn("in", new DirectImporterDescription(MockUnionModel.class, "a/a"));
        Out<Ex1> out = flow.createOut("out", new DupCheckDbExporterDescription() {
            @Override
            public Class<?> getModelType() {
                return MockUnionModel.class;
            }
            @Override
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.