Package com.asakusafw.compiler.testing

Examples of com.asakusafw.compiler.testing.JobflowInfo


        In<Ex1> in2 = flow.createIn("in2", new Import(Mode.PRIMARY, "p2", LockType.ROW));
        Out<Ex1> out1 = flow.createOut("out1", new Export("p1"));
        Out<Ex1> out2 = flow.createOut("out2", new Export("p1"));
        FlowDescription desc = new DualIdentityFlow<Ex1>(in1, in2, out1, out2);

        JobflowInfo info = compile(flow, desc);
        assertThat(info, is(nullValue()));
    }
View Full Code Here


        In<Ex1> in2 = flow.createIn("in2", new Import(Mode.PRIMARY, "a", LockType.ROW));
        Out<Ex1> out1 = flow.createOut("out1", new Export("b"));
        Out<Ex1> out2 = flow.createOut("out2", new Export("b"));
        FlowDescription desc = new DualIdentityFlow<Ex1>(in1, in2, out1, out2);

        JobflowInfo info = compile(flow, desc);
        assertThat(info, is(nullValue()));
    }
View Full Code Here

        In<Ex1> in2 = flow.createIn("in2", new Import(Mode.PRIMARY, "a", LockType.ROW));
        Out<Ex1> out1 = flow.createOut("out1", new Export("a"));
        Out<Ex1> out2 = flow.createOut("out2", new Export("b"));
        FlowDescription desc = new DualIdentityFlow<Ex1>(in1, in2, out1, out2);

        JobflowInfo info = compile(flow, desc);
        assertThat(info, is(nullValue()));
    }
View Full Code Here

        In<Ex1> in2 = flow.createIn("in2", new Import(Mode.SECONDARY, "a", LockType.UNUSED));
        Out<Ex1> out1 = flow.createOut("out1", new Export("a"));
        Out<Ex1> out2 = flow.createOut("out2", new Export("a"));
        FlowDescription desc = new DualIdentityFlow<Ex1>(in1, in2, out1, out2);

        JobflowInfo info = compile(flow, desc);
        assertThat(info, not(nullValue()));
        List<ExternalIoCommandProvider> commands = info.getCommandProviders();
        ExternalIoCommandProvider provider = BulkLoaderIoProcessor.findRelated(commands);
        assertThat(provider, not(nullValue()));

        CommandContext context = new CommandContext("home", "id", "");
        assertThat("2回にわけない", provider.getImportCommand(context).size(), is(1));
View Full Code Here

        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Cached> in = flow.createIn("in1", new ImportCached("default", LockType.UNUSED, null, DataSize.UNKNOWN));
        Out<Cached> out = flow.createOut("out1", new Export("default", Cached.class));
        FlowDescription desc = new IdentityFlow<Cached>(in, out);

        JobflowInfo info = compile(flow, desc);
        assertThat(info, not(nullValue()));
        List<ExternalIoCommandProvider> commands = info.getCommandProviders();
        ExternalIoCommandProvider provider = BulkLoaderIoProcessor.findRelated(commands);
        assertThat(provider, not(nullValue()));

        CommandContext context = new CommandContext("home", "id", "");
        assertThat(provider.getImportCommand(context).size(), is(1));
View Full Code Here

        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Cached> in = flow.createIn("in1", new ImportCached("default", LockType.UNUSED, "SID > 0", DataSize.UNKNOWN));
        Out<Cached> out = flow.createOut("out1", new Export("default", Cached.class));
        FlowDescription desc = new IdentityFlow<Cached>(in, out);

        JobflowInfo info = compile(flow, desc);
        assertThat(info, is(nullValue()));
    }
View Full Code Here

        FlowDescriptionDriver flow = new FlowDescriptionDriver();
        In<Cached> in = flow.createIn("in1", new ImportCached("default", LockType.UNUSED, null, DataSize.UNKNOWN, Ex1.class));
        Out<Cached> out = flow.createOut("out1", new Export("default", Ex1.class));
        FlowDescription desc = new IdentityFlow<Cached>(in, out);

        JobflowInfo info = compile(flow, desc);
        assertThat(info, is(nullValue()));
    }
View Full Code Here

            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());

            JobflowExecutor executor = new JobflowExecutor(driverContext);
View Full Code Here

            if (compileWorkDir.exists()) {
                FileUtils.forceDelete(compileWorkDir);
            }

            FlowGraph flowGraph = jobFlowClass.getGraph();
            JobflowInfo jobflowInfo = DirectFlowCompiler.compile(
                flowGraph,
                batchId,
                flowId,
                "test.jobflow",
                Location.fromPath(driverContext.getClusterWorkDir(), '/'),
View Full Code Here

     * Input single dataset.
     * @throws Exception if failed
     */
    @Test
    public void input_single() throws Exception {
        JobflowInfo info = tester.compileJobflow(NormalInputJob.class);

        ModelOutput<Ex1> s10 = openOutput(Ex1.class, Location.fromPath("target/testing/in/normal1-0", '/'));
        writeEx1(s10, 1, 2);

        ModelOutput<Ex1> s20 = openOutput(Ex1.class, Location.fromPath("target/testing/in/normal2-0", '/'));
View Full Code Here

TOP

Related Classes of com.asakusafw.compiler.testing.JobflowInfo

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.