Package com.asakusafw.yaess.core

Examples of com.asakusafw.yaess.core.BatchScript


     * @throws Exception if failed
     */
    @Test
    public void simple() throws Exception {
        Properties p = compile(SimpleBatch.class);
        BatchScript script = BatchScript.load(p);
        assertThat(FlowScript.extractFlowIds(p), is(set("first")));

        FlowScript first = script.findFlow("first");
        assertThat(first.getId(), is("first"));
        assertThat(first.getBlockerIds(), is(set()));
        Map<ExecutionPhase, Set<ExecutionScript>> firstScripts = first.getScripts();
        assertThat(firstScripts.get(ExecutionPhase.SETUP).size(), is(0));
        assertThat(firstScripts.get(ExecutionPhase.CLEANUP).size(), is(0));
View Full Code Here


     * @throws Exception if failed
     */
    @Test
    public void complex() throws Exception {
        Properties p = compile(ComplexBatch.class);
        BatchScript script = BatchScript.load(p);
        assertThat(FlowScript.extractFlowIds(p), is(set("last")));

        FlowScript last = script.findFlow("last");
        assertThat(last.getId(), is("last"));
        assertThat(last.getBlockerIds(), is(set()));
        Map<ExecutionPhase, Set<ExecutionScript>> lastScripts = last.getScripts();
        assertThat(lastScripts.get(ExecutionPhase.MAIN).size(), is(3));
        Set<String> blockers = Sets.create();
View Full Code Here

     * @throws Exception if failed
     */
    @Test
    public void diamond() throws Exception {
        Properties p = compile(DiamondBatch.class);
        BatchScript script = BatchScript.load(p);

        assertThat(FlowScript.extractFlowIds(p), is(set("first", "left", "right", "last")));

        FlowScript first = script.findFlow("first");
        FlowScript left = script.findFlow("left");
        FlowScript right = script.findFlow("right");
        FlowScript last = script.findFlow("last");

        assertThat(first.getId(), is("first"));
        assertThat(left.getId(), is("left"));
        assertThat(right.getId(), is("right"));
        assertThat(last.getId(), is("last"));
View Full Code Here

        return UUID.randomUUID().toString();
    }

    static RunTask.Configuration loadConfiguration(Arguments args) {
        assert args != null;
        BatchScript script;
        File scriptFile = getScriptFile(args.context, args.batchId);
        LOG.debug("Loading script: {}", scriptFile);
        try {
            Properties properties = loadProperties(scriptFile);
            script = BatchScript.load(properties);
View Full Code Here

                : profile.getCommandHandlers().entrySet()) {
            commandHandlers.put(entry.getKey(), entry.getValue().newInstance());
        }

        LOG.debug("Extracting batch script");
        BatchScript batch = BatchScript.load(script);

        ExecutionTask result = new ExecutionTask(
                monitors,
                locks,
                scheduler,
View Full Code Here

TOP

Related Classes of com.asakusafw.yaess.core.BatchScript

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.