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

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


  }

  @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


      String hostDescriptionId, String applicationDescriptionId)
      throws RegistryException {
    List<ApplicationJob> jobs=new ArrayList<ApplicationJob>();
    List<GFacJobDataResource> gFacJobs = jpa.getWorker().getGFacJobs(serviceDescriptionId,hostDescriptionId,applicationDescriptionId);
    for (GFacJobDataResource resource : gFacJobs) {
      ApplicationJob job = new ApplicationJob();
      setupValues(resource, job);
      jobs.add(job);
    }
    return jobs;
  }
View Full Code Here

        throw new WorkflowInstanceNodeDoesNotExistsException(workflowExecutionId, nodeId);
      }
      gFacJobs = jpa.getWorker().getExperiment(experimentId).getData().getWorkflowInstance(workflowExecutionId).getNodeData(nodeId).getGFacJobs();
    }
    for (Resource resource : gFacJobs) {
      ApplicationJob job = new ApplicationJob();
      setupValues((GFacJobDataResource)resource, job);
      jobs.add(job);
    }
    return jobs;
  }
View Full Code Here

           gsiSshProvider = new GSISSHProvider();
        }
    }

    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

        return ApplicationJobStatus.UNKNOWN;
    }

    private void saveApplicationJob(JobExecutionContext jobExecutionContext, JobDefinitionType jobDefinition,
                                    String metadata) {
        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());
        appJob.setMetadata(metadata);
        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 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

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.