Package org.apache.airavata.registry.api.workflow

Examples of org.apache.airavata.registry.api.workflow.ApplicationJob


    return ApplicationJobStatus.UNKNOWN;
  }
 
  private void saveApplicationJob(JobExecutionContext jobExecutionContext,
      JobDefinitionType jobDefinition) {
    ApplicationJob appJob = GFacUtils.createApplicationJob(jobExecutionContext);
        appJob.setJobId(jobId);
        appJob.setJobData(jobDefinition.toString());
        appJob.setSubmittedTime(Calendar.getInstance().getTime());
        appJob.setStatus(ApplicationJobStatus.SUBMITTED);
        appJob.setStatusUpdateTime(appJob.getSubmittedTime());
        GFacUtils.recordApplicationJob(jobExecutionContext, appJob);
  }
View Full Code Here


    }
   

  public static ApplicationJob createApplicationJob(
      JobExecutionContext jobExecutionContext) {
    ApplicationJob appJob = new ApplicationJob();
    appJob.setExperimentId((String) jobExecutionContext.getProperty(Constants.PROP_TOPIC));
    appJob.setWorkflowExecutionId(appJob.getExperimentId());
    appJob.setNodeId((String)jobExecutionContext.getProperty(Constants.PROP_WORKFLOW_NODE_ID));
    appJob.setServiceDescriptionId(jobExecutionContext.getApplicationContext().getServiceDescription().getType().getName());
    appJob.setHostDescriptionId(jobExecutionContext.getApplicationContext().getHostDescription().getType().getHostName());
    appJob.setApplicationDescriptionId(jobExecutionContext.getApplicationContext().getApplicationDeploymentDescription().getType().getApplicationName().getStringValue());
    return appJob;
  }
View Full Code Here

  private void saveApplicationJob(JobExecutionContext jobExecutionContext)
      throws GFacProviderException {
    ApplicationDeploymentDescriptionType app = jobExecutionContext.
                getApplicationContext().getApplicationDeploymentDescription().getType();
    ApplicationJob appJob = GFacUtils.createApplicationJob(jobExecutionContext);
    appJob.setJobId(jobId);
    LocalProviderJobData data = new LocalProviderJobData();
    data.setApplicationName(app.getExecutableLocation());
    data.setInputDir(app.getInputDataDirectory());
    data.setOutputDir(app.getOutputDataDirectory());
    data.setWorkingDir(builder.directory().toString());
    data.setInputParameters(ProviderUtils.getInputParameters(jobExecutionContext));
    ByteArrayOutputStream stream = new ByteArrayOutputStream();
    JAXB.marshal(data, stream);
    appJob.setJobData(stream.toString());
    appJob.setSubmittedTime(Calendar.getInstance().getTime());
    appJob.setStatus(ApplicationJobStatus.SUBMITTED);
    appJob.setStatusUpdateTime(appJob.getSubmittedTime());
    GFacUtils.recordApplicationJob(jobExecutionContext, appJob);
  }
View Full Code Here

      throw new GFacProviderException(e.getLocalizedMessage(), e);
    }
  }

  private void saveApplicationJob(JobExecutionContext jobExecutionContext, String executableName) {
    ApplicationJob job = GFacUtils.createApplicationJob(jobExecutionContext);
    job.setJobId(jobID);
    job.setStatus(ApplicationJobStatus.INITIALIZE);
    job.setSubmittedTime(Calendar.getInstance().getTime());
    job.setStatusUpdateTime(job.getSubmittedTime());
    job.setJobData(executableName);
    GFacUtils.recordApplicationJob(jobExecutionContext, job);
  }
View Full Code Here

        submitJobs(gateKeeper, jobExecutionContext, globusHostType);

    }

  private void saveApplicationJob(JobExecutionContext jobExecutionContext, ApplicationJobStatus jobStatus) {
    ApplicationJob appJob = GFacUtils.createApplicationJob(jobExecutionContext);
    appJob.setJobId(job.getIDAsString());
    appJob.setJobData(job.getRSL());
    appJob.setSubmittedTime(Calendar.getInstance().getTime());
    appJob.setStatus(jobStatus);
    appJob.setStatusUpdateTime(appJob.getSubmittedTime());
    GFacUtils.recordApplicationJob(jobExecutionContext, appJob);
  }
View Full Code Here

    return ApplicationJobStatus.UNKNOWN;
  }
 
  private void saveApplicationJob(JobExecutionContext jobExecutionContext,
      JobDefinitionType jobDefinition) {
    ApplicationJob appJob = GFacUtils.createApplicationJob(jobExecutionContext);
        appJob.setJobId(jobId);
        appJob.setJobData(jobDefinition.toString());
        appJob.setSubmittedTime(Calendar.getInstance().getTime());
        appJob.setStatus(ApplicationJobStatus.SUBMITTED);
        appJob.setStatusUpdateTime(appJob.getSubmittedTime());
        GFacUtils.recordApplicationJob(jobExecutionContext, appJob);
  }
View Full Code Here

  private void saveApplicationJob(JobExecutionContext jobExecutionContext)
      throws GFacProviderException {
    ApplicationDeploymentDescriptionType app = jobExecutionContext.
                getApplicationContext().getApplicationDeploymentDescription().getType();
    ApplicationJob appJob = GFacUtils.createApplicationJob(jobExecutionContext);
    appJob.setJobId(jobId);
    LocalProviderJobData data = new LocalProviderJobData();
    data.setApplicationName(app.getExecutableLocation());
    data.setInputDir(app.getInputDataDirectory());
    data.setOutputDir(app.getOutputDataDirectory());
    data.setWorkingDir(builder.directory().toString());
    data.setInputParameters(ProviderUtils.getInputParameters(jobExecutionContext));
    ByteArrayOutputStream stream = new ByteArrayOutputStream();
    JAXB.marshal(data, stream);
    appJob.setJobData(stream.toString());
    appJob.setSubmittedTime(Calendar.getInstance().getTime());
    appJob.setStatus(ApplicationJobStatus.SUBMITTED);
    appJob.setStatusUpdateTime(appJob.getSubmittedTime());
    GFacUtils.recordApplicationJob(jobExecutionContext, appJob);
  }
View Full Code Here

        initEc2Environment(jobExecutionContext, ec2client);
        checkConnection(instance, ec2client);
    }

  private void saveApplicationJob(JobExecutionContext jobExecutionContext) {
    ApplicationJob job = GFacUtils.createApplicationJob(jobExecutionContext);
        job.setJobId(jobId);
        job.setStatus(ApplicationJobStatus.VALIDATE_INPUT);
        job.setSubmittedTime(Calendar.getInstance().getTime());
        job.setStatusUpdateTime(job.getSubmittedTime());
        GFacUtils.recordApplicationJob(jobExecutionContext, job);
  }
View Full Code Here

  public void updateWorkflowNodeGramData(
      WorkflowNodeGramData workflowNodeGramData) throws RegistryException {
        if (provenanceRegistry != null){
            provenanceRegistry.updateWorkflowNodeGramData(workflowNodeGramData);
        }else {
          ApplicationJob job = new ApplicationJob();
          job.setJobId(workflowNodeGramData.getGramJobID());
          job.setHostDescriptionId(workflowNodeGramData.getInvokedHost());
          job.setExperimentId(workflowNodeGramData.getWorkflowInstanceId());
          job.setWorkflowExecutionId(workflowNodeGramData.getWorkflowInstanceId());
          job.setNodeId(workflowNodeGramData.getNodeID());
          job.setJobData(workflowNodeGramData.getRsl());
          if (isApplicationJobExists(job.getJobId())){
            updateApplicationJob(job);
          }else{
            addApplicationJob(job);
          }
        }
View Full Code Here

  }

  @Override
  public ApplicationJob getApplicationJob(String gfacJobId) throws RegistryException {
    GFacJobDataResource gfacJob = validateAndGetGFacJob(gfacJobId);
    ApplicationJob job = new ApplicationJob();
    setupValues(gfacJob, job);
    return job;
  }
View Full Code Here

TOP

Related Classes of org.apache.airavata.registry.api.workflow.ApplicationJob

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.