Package com.asakusafw.compiler.batch

Examples of com.asakusafw.compiler.batch.BatchDriver


        assert packageName != null;
        assert hadoopWorkLocation != null;
        assert compilerWorkDirectory != null;
        assert linkingResources != null;
        try {
            BatchDriver analyzed = BatchDriver.analyze(batchDescription);
            if (analyzed.hasError()) {
                for (String diagnostic : analyzed.getDiagnostics()) {
                    LOG.error(diagnostic);
                }
                return false;
            }

            String batchId = analyzed.getBatchClass().getConfig().name();
            ClassLoader serviceLoader = AccessController.doPrivileged(new PrivilegedAction<ClassLoader>() {
                @Override
                public ClassLoader run() {
                    URLClassLoader loader = new URLClassLoader(
                            pluginLibraries.toArray(new URL[pluginLibraries.size()]),
                            BatchCompilerDriver.class.getClassLoader());
                    return loader;
                }
            });
            DirectBatchCompiler.compile(
                    analyzed.getDescription(),
                    packageName,
                    hadoopWorkLocation,
                    new File(outputDirectory, batchId),
                    new File(compilerWorkDirectory, batchId),
                    linkingResources,
View Full Code Here


        Precondition.checkMustNotBeNull(flowCompilerOptions, "flowCompilerOptions"); //$NON-NLS-1$

        if (localWorkingDirectory.exists()) {
            clean(localWorkingDirectory);
        }
        BatchDriver driver = BatchDriver.analyze(batchClass);
        if (driver.hasError()) {
            throw new IOException(driver.getDiagnostics().toString());
        }

        String batchId = driver.getBatchClass().getConfig().name();
        BatchCompilerConfiguration config = createConfig(
                batchId,
                basePackageName,
                clusterWorkingDirectory,
                outputDirectory,
                localWorkingDirectory,
                extraResources,
                serviceClassLoader,
                flowCompilerOptions);

        BatchCompiler compiler = new BatchCompiler(config);
        Workflow workflow = compiler.compile(driver.getBatchClass().getDescription());
        return toInfo(workflow, outputDirectory);
    }
View Full Code Here

        // 初期化
        LOG.info("バッチをコンパイルしています: {}", batchDescriptionClass.getName());

        // バッチコンパイラの実行
        BatchDriver batchDriver = BatchDriver.analyze(batchDescriptionClass);
        assertFalse(batchDriver.getDiagnostics().toString(), batchDriver.hasError());

        // コンパイル環境の検証
        driverContext.validateCompileEnvironment();

        File compileWorkDir = driverContext.getCompilerWorkingDirectory();
View Full Code Here

            // テストデータ生成ツールを実行し、Excel上のテストデータ定義をデータベースに登録する。
            storeDatabase();
            setLastModifiedTimestamp(new Timestamp(0L));

            // バッチコンパイラの実行
            BatchDriver batchDriver = BatchDriver.analyze(batchDescriptionClass);
            assertFalse(
                    batchDriver.getDiagnostics().toString(),
                    batchDriver.hasError());

            File compileWorkDir = driverContext.getCompilerWorkingDirectory();
            if (compileWorkDir.exists()) {
                FileUtils.forceDelete(compileWorkDir);
            }
View Full Code Here

TOP

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

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.