Package com.asakusafw.compiler.flow.jobflow

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


        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

    container.setLayoutData(new GridData(GridData.FILL_BOTH));
    Button btnCreateSource = new Button(container, SWT.NONE);
    btnCreateSource.addSelectionListener(new SelectionAdapter() {
      @Override
      public void widgetSelected(SelectionEvent e) {
        Source newSource = new Source();
        newSource.setId("Source_" + (table.getItemCount() + 1)); //$NON-NLS-1$
        SourceBindingWrapper sourceBindingWrapper = new SourceBindingWrapper(newSource);
        writableList.add(sourceBindingWrapper);
        tableViewer.setSelection(new StructuredSelection(sourceBindingWrapper));
      }
    });
View Full Code Here

    titleStmt.getTitles().add(title);
    fileDesc.setTitleStmt(titleStmt);
    PubStmt pubStmt = new PubStmt();
    fileDesc.setPubStmt(pubStmt);
    SourceDesc sourceDesc = new SourceDesc();
    Source source = new Source();
    sourceDesc.getSources().add(source);
    fileDesc.setSourceDesc(sourceDesc);   
    meiHead.setFileDesc(fileDesc)
    mei.setMeiHead(meiHead);
    Music music = new Music();
View Full Code Here

  /**
   * {@inheritDoc}
   */
  @Override
  public void connect(PipeTasks pipeTasks) {
    Source source;
    int taskSourceCount;
   
    // Get the input task. A sink only has one input, this corresponds to
    // pipe index 0.
    source = (Source) getInputTask(pipeTasks, 0, Source.class);
   
    // Cast the input feed to the correct type.
    // Connect the tasks.
    source.setSink(task);
   
    // Register all the sources provided by this task as outputs.
    taskSourceCount = task.getSourceCount();
    for (int i = 0; i < taskSourceCount; i++) {
      setOutputTask(pipeTasks, task.getSource(i), i);
View Full Code Here

TOP

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

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.