Package com.asakusafw.yaess.core

Examples of com.asakusafw.yaess.core.ExecutionContext


                map());

        CommandScriptHandler handler = handler(
                "command.0", shell.getAbsolutePath(),
                "command.1", "@[1]");
        ExecutionContext context = new ExecutionContext(
                "tbatch", "tflow", "texec", ExecutionPhase.MAIN, map());
        handler.execute(ExecutionMonitor.NULL, context, script);
    }
View Full Code Here


     * @param <T> script kind
     * @param script target script
     * @param handler target handler
     */
    protected <T extends ExecutionScript> void execute(T script, ExecutionScriptHandler<T> handler) {
        ExecutionContext context = new ExecutionContext("b", "f", "e", ExecutionPhase.MAIN, map());
        execute(context, script, handler);
    }
View Full Code Here

                "com.example.Client",
                map(),
                map());

        HadoopScriptHandler handler = handler("env.ASAKUSA_HOME", getAsakusaHome().getAbsolutePath());
        ExecutionContext context = new ExecutionContext(
                "tbatch", "tflow", "texec", ExecutionPhase.MAIN, map("hello", "world", "key", "value"));
        execute(context, script, handler);

        List<String> results = getOutput(shell);
        assertThat(results.subList(0, 5), is(Arrays.asList(
                "com.example.Client",
                "tbatch",
                "tflow",
                "texec",
                context.getArgumentsAsString())));
    }
View Full Code Here

        assertThat(count, greaterThan(last));
        return count;
    }

    private ExecutionContext context(ExecutionPhase phase) {
        return new ExecutionContext("batch", "flow", "exec", phase, Collections.<String, String>emptyMap());
    }
View Full Code Here

        RuntimeContext rc = RuntimeContext.DEFAULT
            .batchId("b")
            .mode(ExecutionMode.SIMULATION)
            .buildId("OK");
        ExecutionContext context = new ExecutionContext(
                "b", "f", "e", ExecutionPhase.MAIN, map(), rc.unapply());
        execute(context, script, handler);

        Map<String, String> map = new HashMap<String, String>();
        for (String line : getOutput(shell)) {
View Full Code Here

                "testing", set(), "profile", "module",
                Arrays.asList(shell.getAbsolutePath(), "Hello, world!"),
                map());

        CommandScriptHandler handler = handler();
        ExecutionContext context = new ExecutionContext(
                "tbatch", "tflow", "texec", ExecutionPhase.MAIN, map());
        handler.execute(ExecutionMonitor.NULL, context, script);
    }
View Full Code Here

     */
    @Test
    public void setup() throws Exception {
        CommandScriptHandler handler = handler();

        ExecutionContext context = new ExecutionContext(
                "tbatch", "tflow", "texec", ExecutionPhase.SETUP, map());
        handler.setUp(ExecutionMonitor.NULL, context);
    }
View Full Code Here

     */
    @Test
    public void cleanup() throws Exception {
        CommandScriptHandler handler = handler();

        ExecutionContext context = new ExecutionContext(
                "tbatch", "tflow", "texec", ExecutionPhase.CLEANUP, map());
        handler.cleanUp(ExecutionMonitor.NULL, context);
    }
View Full Code Here

                "testing", set(), "profile", "module",
                Arrays.asList(shell.getAbsolutePath(), "Hello, world!"),
                map());

        CommandScriptHandler handler = handler();
        ExecutionContext context = new ExecutionContext(
                "tbatch", "tflow", "texec", ExecutionPhase.MAIN, map());
        handler.execute(ExecutionMonitor.NULL, context, script);
    }
View Full Code Here

                map());

        CommandScriptHandler handler = handler(
                "command.0", shell.getAbsolutePath(),
                "command.1", "@[1]");
        ExecutionContext context = new ExecutionContext(
                "tbatch", "tflow", "texec", ExecutionPhase.MAIN, map());
        handler.execute(ExecutionMonitor.NULL, context, script);
    }
View Full Code Here

TOP

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

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.