Package com.asakusafw.compiler.testing

Examples of com.asakusafw.compiler.testing.JobflowInfo


        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


        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

        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

     */
    public JobflowInfo compileJobflow(Class<? extends FlowDescription> description) throws IOException {
        JobFlowDriver driver = JobFlowDriver.analyze(description);
        assertThat(driver.getDiagnostics().toString(), driver.hasError(), is(false));
        List<File> classPath = buildClassPath(description);
        JobflowInfo info = DirectFlowCompiler.compile(
                driver.getJobFlowClass().getGraph(),
                "testing",
                driver.getJobFlowClass().getConfig().name(),
                "com.example",
                hadoopDriver.toPath(path("runtime", "jobflow")),
View Full Code Here

     */
    public boolean runJobflow(Class<? extends FlowDescription> description) throws IOException {
        if (description == null) {
            throw new IllegalArgumentException("description must not be null"); //$NON-NLS-1$
        }
        JobflowInfo info = compileJobflow(description);
        return run(info);
    }
View Full Code Here

            FileUtils.forceDelete(compileWorkDir);
        }

        String batchId = "testing";
        String flowId = "flowpart";
        JobflowInfo jobflowInfo = DirectFlowCompiler.compile(
                flowGraph,
                batchId,
                flowId,
                "test.flowpart",
                FlowPartDriverUtils.createWorkingLocation(driverContext),
View Full Code Here

        }

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

        tester.options().putExtraAttribute(ParallelSortClientEmitter.ATTRIBUTE_LEGACY, "true");
        single0();
    }

    private void single0() throws IOException {
        JobflowInfo info = tester.compileJobflow(SingleOutputJob.class);

        ModelOutput<Ex1> source = tester.openOutput(Ex1.class, tester.getImporter(info, "input"));
        writeTestData(source);
        source.close();
View Full Code Here

        tester.options().putExtraAttribute(ParallelSortClientEmitter.ATTRIBUTE_LEGACY, "true");
        multiple0();
    }

    private void multiple0() throws IOException {
        JobflowInfo info = tester.compileJobflow(MultipleOutputJob.class);

        ModelOutput<Ex1> source = tester.openOutput(Ex1.class, tester.getImporter(info, "input"));
        writeTestData(source);
        source.close();
View Full Code Here

        tester.options().putExtraAttribute(ParallelSortClientEmitter.ATTRIBUTE_LEGACY, "true");
        independent0();
    }

    private void independent0() throws IOException {
        JobflowInfo info = tester.compileJobflow(IndependentOutputJob.class);

        ModelOutput<Ex1> source = tester.openOutput(Ex1.class, tester.getImporter(info, "input"));
        writeTestData(source);
        source.close();
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.