Package com.asakusafw.compiler.flow.jobflow

Examples of com.asakusafw.compiler.flow.jobflow.JobflowModel$Stage


        Precondition.checkMustNotBeNull(graph, "graph"); //$NON-NLS-1$
        validate(graph);
        StageGraph stageGraph = plan(graph);
        visualize(graph, stageGraph);
        List<StageModel> stages = compileStages(stageGraph);
        JobflowModel jobflow = compileJobflow(stageGraph, stages);
        addApplicationInfo();
        return jobflow;
    }
View Full Code Here


                repositories,
                serviceClassLoader,
                flowCompilerOptions);

        FlowCompiler compiler = new FlowCompiler(config);
        JobflowModel jobflow = compiler.compile(flowGraph);

        File jobflowSources = new File(
                localWorkingDirectory,
                Naming.getJobflowSourceBundleName(flowId));
        File jobflowPackage = new File(
View Full Code Here

        BatchCompilingEnvironment env = prov.getEnvironment();
        JobFlowWorkDescriptionProcessor proc = new JobFlowWorkDescriptionProcessor();
        proc.initialize(env);

        JobFlowWorkDescription jobflow = new JobFlowWorkDescription(SimpleJobFlow.class);
        JobflowModel model = proc.process(jobflow);

        File jar = JobFlowWorkDescriptionProcessor.getPackageLocation(
                env.getConfiguration().getOutputDirectory(),
                model.getFlowId());
        JobflowInfo info = DirectFlowCompiler.toInfo(model, jar, jar);

        ModelOutput<Ex1> output = tester.openOutput(
                Ex1.class,
                Location.fromPath("target/testing/SimpleJobFlow/importer/out", '/'));
View Full Code Here

    private static final String JOBFLOW_TEMPORARY = "build";

    @Override
    public JobflowModel process(
            JobFlowWorkDescription description) throws IOException {
        JobflowModel model = build(description);
        return model;
    }
View Full Code Here

        if (jobflow == null) {
            return null;
        }
        FlowCompilerConfiguration config = createConfiguration(jobflow);
        FlowCompiler compiler = new FlowCompiler(config);
        JobflowModel model = compiler.compile(jobflow.getGraph());

        File batchOutput = getEnvironment().getConfiguration().getOutputDirectory();
        String flowId = compiler.getTargetFlowId();
        compiler.buildSources(getPackageLocation(batchOutput, flowId));
        compiler.collectSources(getSourceLocation(batchOutput, flowId));
View Full Code Here

        assert unit != null;
        assert outputDirectory != null;
        if ((unit.getDescription() instanceof JobFlowWorkDescription) == false) {
            return null;
        }
        JobflowModel model = (JobflowModel) unit.getProcessed();
        String flowId = model.getFlowId();
        return new JobflowInfo(
                model,
                JobFlowWorkDescriptionProcessor.getPackageLocation(outputDirectory, flowId),
                JobFlowWorkDescriptionProcessor.getSourceLocation(outputDirectory, flowId),
                toStagePlan(model));
View Full Code Here

    }

    private FlowScript processJobflow(Workflow.Unit unit, Set<Workflow.Unit> blockers) {
        assert unit != null;
        assert blockers != null;
        JobflowModel model = toJobflowModel(unit);
        CommandContext context = new CommandContext(
                ExecutionScript.PLACEHOLDER_HOME + '/',
                ExecutionScript.PLACEHOLDER_EXECUTION_ID,
                ExecutionScript.PLACEHOLDER_ARGUMENTS);
        Map<ExecutionPhase, List<ExecutionScript>> scripts = Maps.create();
        scripts.put(ExecutionPhase.INITIALIZE, processInitializers(model, context));
        scripts.put(ExecutionPhase.IMPORT, processImporters(model, context));
        scripts.put(ExecutionPhase.PROLOGUE, processPrologues(model, context));
        scripts.put(ExecutionPhase.MAIN, processMain(model, context));
        scripts.put(ExecutionPhase.EPILOGUE, processEpilogues(model, context));
        scripts.put(ExecutionPhase.EXPORT, processExporters(model, context));
        scripts.put(ExecutionPhase.FINALIZE, processFinalizers(model, context));
        return new FlowScript(model.getFlowId(), toUnitNames(blockers), scripts);
    }
View Full Code Here

TOP

Related Classes of com.asakusafw.compiler.flow.jobflow.JobflowModel$Stage

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.