Package com.asakusafw.yaess.core

Examples of com.asakusafw.yaess.core.HadoopScript


    @Test
    public void properties() throws Exception {
        String target = new File(getAsakusaHome(), ProcessHadoopScriptHandler.PATH_EXECUTE).getAbsolutePath();
        File shell = putScript("arguments.sh", new File(target));

        HadoopScript script = new HadoopScript(
                "testing",
                set(),
                "com.example.Client",
                map("hello", "world", "hoge", "foo"),
                map());
View Full Code Here


    @Test
    public void complex_prefix() throws Exception {
        String target = new File(getAsakusaHome(), ProcessHadoopScriptHandler.PATH_EXECUTE).getAbsolutePath();
        File shell = putScript("arguments.sh", new File(target));

        HadoopScript script = new HadoopScript(
                "testing",
                set(),
                "com.example.Client",
                map(),
                map());
View Full Code Here

    @Test
    public void environment() throws Exception {
        String target = new File(getAsakusaHome(), ProcessHadoopScriptHandler.PATH_EXECUTE).getAbsolutePath();
        File shell = putScript("environment.sh", new File(target));

        HadoopScript script = new HadoopScript(
                "testing",
                set(),
                "com.example.Client",
                map(),
                map("script", "SCRIPT", "override", "SCRIPT"));
View Full Code Here

    @Test
    public void runtime_context() throws Exception {
        String target = new File(getAsakusaHome(), ProcessHadoopScriptHandler.PATH_EXECUTE).getAbsolutePath();
        File shell = putScript("environment.sh", new File(target));

        HadoopScript script = new HadoopScript(
                "testing",
                set(),
                "com.example.Client",
                map(),
                map("script", "SCRIPT", "override", "SCRIPT"));
View Full Code Here

    @Test(expected = IOException.class)
    public void home_missing() throws Exception {
        String target = new File(getAsakusaHome(), ProcessHadoopScriptHandler.PATH_EXECUTE).getAbsolutePath();
        putScript("arguments.sh", new File(target));

        HadoopScript script = new HadoopScript(
                "testing",
                set(),
                "com.example.Client",
                map(),
                map());
View Full Code Here

    @Test(expected = IOException.class)
    public void abnormal_exit() throws Exception {
        String target = new File(getAsakusaHome(), ProcessHadoopScriptHandler.PATH_EXECUTE).getAbsolutePath();
        putScript("abnormal.sh", new File(target));

        HadoopScript script = new HadoopScript(
                "testing",
                set(),
                "com.example.Client",
                map(),
                map());
View Full Code Here

     * Script is missing.
     * @throws Exception if failed
     */
    @Test(expected = IOException.class)
    public void script_missing() throws Exception {
        HadoopScript script = new HadoopScript(
                "testing",
                set(),
                "com.example.Client",
                map(),
                map());
View Full Code Here

    @Test(expected = IOException.class)
    public void invalid_prefix() throws Exception {
        String target = new File(getAsakusaHome(), ProcessHadoopScriptHandler.PATH_EXECUTE).getAbsolutePath();
        putScript("arguments.sh", new File(target));

        HadoopScript script = new HadoopScript(
                "testing",
                set(),
                "com.example.Client",
                map(),
                map());
View Full Code Here

    private List<TestExecutionPlan.Job> resolveJobs(FlowScript flow, ExecutionPhase phase) throws IOException {
        ExecutionContext context = createExecutionContext(flow, phase);
        List<TestExecutionPlan.Job> results = new ArrayList<TestExecutionPlan.Job>();
        for (ExecutionScript script : flow.getScripts().get(phase)) {
            HadoopScript resolved = (HadoopScript) resolveScript(script, context);
            Map<String, String> props = new TreeMap<String, String>();
            props.putAll(getHadoopProperties());
            props.putAll(resolved.getHadoopProperties());
            results.add(new TestExecutionPlan.Job(
                    resolved.getClassName(),
                    context.getExecutionId(),
                    props));
        }
        return results;
    }
View Full Code Here

        String stageId = stage.getStageId();
        Set<String> blockerIds = toStageNames(blockers);
        String className = stage.getQualifiedName().toNameString();
        Map<String, String> props = Collections.emptyMap();
        Map<String, String> envs = Collections.emptyMap();
        return new HadoopScript(stageId, blockerIds, className, props, envs);
    }
View Full Code Here

TOP

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

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.