Package com.asakusafw.compiler.batch

Examples of com.asakusafw.compiler.batch.BatchCompilerConfiguration


        assertThat(pd.getPattern(), is("."));
    }

    private BatchSpecProcessor createProcessor() throws IOException {
        File work = folder.newFolder();
        BatchCompilerConfiguration config = DirectBatchCompiler.createConfig(
                "testing",
                "com.example",
                Location.fromPath("target/testing", '/'),
                output,
                work,
View Full Code Here


        if (driver.hasError()) {
            throw new IOException(driver.getDiagnostics().toString());
        }

        String batchId = driver.getBatchClass().getConfig().name();
        BatchCompilerConfiguration config = createConfig(
                batchId,
                basePackageName,
                clusterWorkingDirectory,
                outputDirectory,
                localWorkingDirectory,
View Full Code Here

        assert outputDirectory != null;
        assert localWorkingDirectory != null;
        assert extraResources != null;
        assert serviceClassLoader != null;
        assert flowCompilerOptions != null;
        BatchCompilerConfiguration config = new BatchCompilerConfiguration();
        config.setBatchId(batchId);
        config.setDataClasses(new SpiDataClassRepository());
        config.setExternals(new SpiExternalIoDescriptionProcessorRepository());
        config.setGraphRewriters(new SpiFlowGraphRewriterRepository());
        config.setFactory(Models.getModelFactory());
        config.setFlowElements(new SpiFlowElementProcessorRepository());
        config.setLinkingResources(DirectFlowCompiler.createRepositories(serviceClassLoader, extraResources));
        config.setOutputDirectory(outputDirectory);
        config.setRootLocation(clusterWorkingLocation);
        config.setRootPackageName(basePackageName);
        config.setWorkflows(new SpiWorkflowProcessorRepository());
        config.setServiceClassLoader(serviceClassLoader);
        config.setWorkingDirectory(localWorkingDirectory);
        config.setFlowCompilerOptions(flowCompilerOptions);
        return config;
    }
View Full Code Here

        return model;
    }

    private FlowCompilerConfiguration createConfiguration(JobFlowClass jobflow) {
        assert jobflow != null;
        BatchCompilerConfiguration batch = getEnvironment().getConfiguration();
        FlowCompilerConfiguration result = new FlowCompilerConfiguration();
        result.setBatchId(batch.getBatchId());
        result.setDataClasses(batch.getDataClasses());
        result.setExternals(batch.getExternals());
        result.setFactory(batch.getFactory());
        result.setFlowId(jobflow.getConfig().name());
        result.setGraphRewriters(batch.getGraphRewriters());
        result.setPackager(createPackager(jobflow));
        result.setProcessors(batch.getFlowElements());
        result.setRootLocation(batch.getRootLocation());
        result.setRootPackageName(batch.getRootPackageName());
        result.setServiceClassLoader(batch.getServiceClassLoader());
        result.setOptions(getEnvironment().getConfiguration().getFlowCompilerOptions());
        result.setBuildId(getEnvironment().getBuildId());
        return result;
    }
View Full Code Here

        return result;
    }

    private Packager createPackager(JobFlowClass jobflow) {
        assert jobflow != null;
        BatchCompilerConfiguration batch = getEnvironment().getConfiguration();
        return new FilePackager(
                new File(
                        new File(batch.getWorkingDirectory(), jobflow.getConfig().name()),
                        JOBFLOW_TEMPORARY),
                batch.getLinkingResources());
    }
View Full Code Here

TOP

Related Classes of com.asakusafw.compiler.batch.BatchCompilerConfiguration

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.