airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject [1/2] airavata git commit: fixing AIRAVATA-1687
Date Wed, 22 Apr 2015 20:38:45 GMT
Repository: airavata
Updated Branches:
  refs/heads/master 0f8269da3 -> 9cadde8ef


http://git-wip-us.apache.org/repos/asf/airavata/blob/9cadde8e/airavata-api/thrift-interface-descriptions/experimentModel.thrift
----------------------------------------------------------------------
diff --git a/airavata-api/thrift-interface-descriptions/experimentModel.thrift b/airavata-api/thrift-interface-descriptions/experimentModel.thrift
index 2cd82d3..552475f 100644
--- a/airavata-api/thrift-interface-descriptions/experimentModel.thrift
+++ b/airavata-api/thrift-interface-descriptions/experimentModel.thrift
@@ -273,7 +273,8 @@ struct JobDetails {
     5: optional ApplicationStatus applicationStatus,
     6: optional list<ErrorDetails> errors,
     7: optional string computeResourceConsumed,
-    8: optional string jobName
+    8: optional string jobName,
+    9: optional string workingDir
 }
 
 struct DataTransferDetails {
@@ -378,16 +379,17 @@ struct Experiment {
     8: optional string applicationVersion,
     9: optional string workflowTemplateId,
     10: optional string workflowTemplateVersion,
-    11: optional bool enableEmailNotification,
-    12: optional list<string> emailAddresses,
-    13: optional UserConfigurationData userConfigurationData,
-    14: optional string workflowExecutionInstanceId,
-    15: optional list<applicationInterfaceModel.InputDataObjectType> experimentInputs,
-    16: optional list<applicationInterfaceModel.OutputDataObjectType> experimentOutputs,
-    17: optional ExperimentStatus experimentStatus,
-    18: optional list<WorkflowNodeStatus> stateChangeList,
-    19: optional list<WorkflowNodeDetails> workflowNodeDetailsList,
-    20: optional list<ErrorDetails> errors
+    11: optional string gatewayExecutionId,
+    12: optional bool enableEmailNotification,
+    13: optional list<string> emailAddresses,
+    14: optional UserConfigurationData userConfigurationData,
+    15: optional string workflowExecutionInstanceId,
+    16: optional list<applicationInterfaceModel.InputDataObjectType> experimentInputs,
+    17: optional list<applicationInterfaceModel.OutputDataObjectType> experimentOutputs,
+    18: optional ExperimentStatus experimentStatus,
+    19: optional list<WorkflowNodeStatus> stateChangeList,
+    20: optional list<WorkflowNodeDetails> workflowNodeDetailsList,
+    21: optional list<ErrorDetails> errors
 }
 
 struct ExperimentSummary {

http://git-wip-us.apache.org/repos/asf/airavata/blob/9cadde8e/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java
b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java
index ec2c081..4ac7ad0 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java
@@ -71,6 +71,7 @@ public class ExperimentRegistry {
             experimentResource.setExecutionUser(experiment.getUserName());
             GatewayResource gateway = (GatewayResource)ResourceUtils.getGateway(gatewayId);
             experimentResource.setGateway(gateway);
+            experimentResource.setGatewayExecutionId(experiment.getGatewayExecutionId());
             experimentResource.setEnableEmailNotifications(experiment.isEnableEmailNotification());
             if (!workerResource.isProjectExists(experiment.getProjectID())) {
                 logger.error("Project does not exist in the system..");
@@ -1190,6 +1191,8 @@ public class ExperimentRegistry {
             jobDetail.setJobDescription(jobDetails.getJobDescription());
             jobDetail.setCreationTime(AiravataUtils.getTime(jobDetails.getCreationTime()));
             jobDetail.setComputeResourceConsumed(jobDetails.getComputeResourceConsumed());
+            jobDetail.setWorkingDir(jobDetails.getWorkingDir());
+            jobDetail.setJobName(jobDetails.getJobName());
             jobDetail.save();
             JobStatus jobStatus = jobDetails.getJobStatus();
             if (jobStatus != null) {
@@ -1235,6 +1238,8 @@ public class ExperimentRegistry {
             jobDetail.setJobDescription(jobDetails.getJobDescription());
             jobDetail.setCreationTime(AiravataUtils.getTime(jobDetails.getCreationTime()));
             jobDetail.setComputeResourceConsumed(jobDetails.getComputeResourceConsumed());
+            jobDetail.setJobName(jobDetails.getJobName());
+            jobDetail.setWorkingDir(jobDetails.getWorkingDir());
             jobDetail.save();
             JobStatus jobStatus = jobDetails.getJobStatus();
             if (jobStatus != null) {
@@ -1620,6 +1625,7 @@ public class ExperimentRegistry {
             existingExperiment.setExpName(experiment.getName());
             existingExperiment.setExecutionUser(experiment.getUserName());
             existingExperiment.setGateway(gatewayResource);
+            existingExperiment.setGatewayExecutionId(experiment.getGatewayExecutionId());
             if (!workerResource.isProjectExists(experiment.getProjectID())) {
                 logger.error("Project does not exist in the system..");
                 throw new Exception("Project does not exist in the system, Please create
the project first...");

http://git-wip-us.apache.org/repos/asf/airavata/blob/9cadde8e/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment.java
b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment.java
index 042dfbe..1c2d430 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/Experiment.java
@@ -58,6 +58,8 @@ public class Experiment implements Serializable {
     private String workflowExecutionId;
     @Column(name = "ALLOW_NOTIFICATION")
     private boolean allowNotification;
+    @Column(name = "GATEWAY_EXECUTION_ID")
+    private String gatewayExecutionId;
 
     @ManyToOne(cascade=CascadeType.MERGE)
     @JoinColumn(name = "GATEWAY_ID")
@@ -198,4 +200,12 @@ public class Experiment implements Serializable {
     public void setAllowNotification(boolean allowNotification) {
         this.allowNotification = allowNotification;
     }
+
+    public String getGatewayExecutionId() {
+        return gatewayExecutionId;
+    }
+
+    public void setGatewayExecutionId(String gatewayExecutionId) {
+        this.gatewayExecutionId = gatewayExecutionId;
+    }
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/9cadde8e/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/JobDetail.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/JobDetail.java
b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/JobDetail.java
index c13fa2f..36f12f8 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/JobDetail.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/JobDetail.java
@@ -45,7 +45,10 @@ public class JobDetail implements Serializable {
     private Timestamp creationTime;
     @Column(name = "COMPUTE_RESOURCE_CONSUMED")
     private String computeResourceConsumed;
-
+    @Column(name = "JOBNAME")
+    private String jobName;
+    @Column(name = "WORKING_DIR")
+    private String workingDir;
 
     @ManyToOne(cascade= CascadeType.MERGE)
     @JoinColumn(name = "TASK_ID")
@@ -98,4 +101,20 @@ public class JobDetail implements Serializable {
     public void setComputeResourceConsumed(String computeResourceConsumed) {
         this.computeResourceConsumed = computeResourceConsumed;
     }
+
+    public String getJobName() {
+        return jobName;
+    }
+
+    public void setJobName(String jobName) {
+        this.jobName = jobName;
+    }
+
+    public String getWorkingDir() {
+        return workingDir;
+    }
+
+    public void setWorkingDir(String workingDir) {
+        this.workingDir = workingDir;
+    }
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/9cadde8e/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentResource.java
b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentResource.java
index 845f513..1d7b58c 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentResource.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/ExperimentResource.java
@@ -53,6 +53,7 @@ public class ExperimentResource extends AbstractResource {
     private String workflowTemplateVersion;
     private String workflowExecutionId;
     private boolean enableEmailNotifications;
+    private String gatewayExecutionId;
 
     /**
      *
@@ -134,6 +135,14 @@ public class ExperimentResource extends AbstractResource {
         this.enableEmailNotifications = enableEmailNotifications;
     }
 
+    public String getGatewayExecutionId() {
+        return gatewayExecutionId;
+    }
+
+    public void setGatewayExecutionId(String gatewayExecutionId) {
+        this.gatewayExecutionId = gatewayExecutionId;
+    }
+
     /**
      * Since experiments are at the leaf level, this method is not
      * valid for an experiment
@@ -583,6 +592,7 @@ public class ExperimentResource extends AbstractResource {
             experiment.setWorkflowTemplateVersion(workflowTemplateVersion);
             experiment.setWorkflowExecutionId(workflowExecutionId);
             experiment.setAllowNotification(enableEmailNotifications);
+            experiment.setGatewayExecutionId(gatewayExecutionId);
             if (existingExp != null) {
                 existingExp.setGateway(gateway);
                 existingExp.setGatewayId(gateway.getGateway_id());
@@ -599,6 +609,7 @@ public class ExperimentResource extends AbstractResource {
                 existingExp.setWorkflowTemplateVersion(workflowTemplateVersion);
                 existingExp.setWorkflowExecutionId(workflowExecutionId);
                 existingExp.setAllowNotification(enableEmailNotifications);
+                existingExp.setGatewayExecutionId(gatewayExecutionId);
                 experiment = em.merge(existingExp);
             } else {
                 em.persist(experiment);

http://git-wip-us.apache.org/repos/asf/airavata/blob/9cadde8e/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/JobDetailResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/JobDetailResource.java
b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/JobDetailResource.java
index ded0991..6e6d2ee 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/JobDetailResource.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/JobDetailResource.java
@@ -44,6 +44,24 @@ public class JobDetailResource extends AbstractResource {
     private String jobDescription;
     private Timestamp creationTime;
     private String computeResourceConsumed;
+    private String jobName;
+    private String workingDir;
+
+    public String getJobName() {
+        return jobName;
+    }
+
+    public void setJobName(String jobName) {
+        this.jobName = jobName;
+    }
+
+    public String getWorkingDir() {
+        return workingDir;
+    }
+
+    public void setWorkingDir(String workingDir) {
+        this.workingDir = workingDir;
+    }
 
     public String getJobId() {
         return jobId;
@@ -266,6 +284,8 @@ public class JobDetailResource extends AbstractResource {
             jobDetail.setTask(taskDetail);
             jobDetail.setTaskId(taskDetailResource.getTaskId());
             jobDetail.setCreationTime(creationTime);
+            jobDetail.setJobName(jobName);
+            jobDetail.setWorkingDir(workingDir);
             if (jobDescription != null) {
                 jobDetail.setJobDescription(jobDescription.toCharArray());
             }
@@ -279,6 +299,8 @@ public class JobDetailResource extends AbstractResource {
                     existingJobDetail.setJobDescription(jobDescription.toCharArray());
                 }
                 existingJobDetail.setComputeResourceConsumed(computeResourceConsumed);
+                existingJobDetail.setJobName(jobName);
+                existingJobDetail.setWorkingDir(workingDir);
                 jobDetail = em.merge(existingJobDetail);
             } else {
                 em.persist(jobDetail);

http://git-wip-us.apache.org/repos/asf/airavata/blob/9cadde8e/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java
b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java
index a9e4a62..eda703a 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/Utils.java
@@ -457,6 +457,7 @@ public class Utils {
             experimentResource.setWorkflowTemplateVersion(o.getWorkflowTemplateVersion());
             experimentResource.setWorkflowExecutionId(o.getWorkflowExecutionId());
             experimentResource.setEnableEmailNotifications(o.isAllowNotification());
+            experimentResource.setGatewayExecutionId(o.getGatewayExecutionId());
         }
 
         return experimentResource;
@@ -669,6 +670,9 @@ public class Utils {
             jobDetailResource.setJobId(o.getJobId());
             jobDetailResource.setCreationTime(o.getCreationTime());
             jobDetailResource.setComputeResourceConsumed(o.getComputeResourceConsumed());
+            jobDetailResource.setJobName(o.getJobName());
+            jobDetailResource.setWorkingDir(o.getWorkingDir());
+
         }
 
         return jobDetailResource;

http://git-wip-us.apache.org/repos/asf/airavata/blob/9cadde8e/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/utils/ThriftDataModelConversion.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/utils/ThriftDataModelConversion.java
b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/utils/ThriftDataModelConversion.java
index 101f98f..8f385e8 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/utils/ThriftDataModelConversion.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/utils/ThriftDataModelConversion.java
@@ -121,6 +121,7 @@ public class ThriftDataModelConversion {
             experiment.setApplicationVersion(experimentResource.getApplicationVersion());
             experiment.setWorkflowTemplateId(experimentResource.getWorkflowTemplateId());
             experiment.setEnableEmailNotification(experimentResource.isEnableEmailNotifications());
+            experiment.setGatewayExecutionId(experimentResource.getGatewayExecutionId());
             if (experiment.isEnableEmailNotification()){
                 List<NotificationEmailResource> notificationEmails = experimentResource.getNotificationEmails();
                 experiment.setEmailAddresses(getEmailAddresses(notificationEmails));
@@ -560,6 +561,8 @@ public class ThriftDataModelConversion {
             jobDetails.setCreationTime(jobDetailResource.getCreationTime().getTime());
             StatusResource jobStatus = jobDetailResource.getJobStatus();
             jobDetails.setJobStatus(getJobStatus(jobStatus));
+            jobDetails.setJobName(jobDetailResource.getJobName());
+            jobDetails.setWorkingDir(jobDetailResource.getWorkingDir());
             StatusResource applicationStatus = jobDetailResource.getApplicationStatus();
             jobDetails.setApplicationStatus(getApplicationStatus(applicationStatus));
             List<ErrorDetailResource> errorDetails = jobDetailResource.getErrorDetails();

http://git-wip-us.apache.org/repos/asf/airavata/blob/9cadde8e/modules/registry/airavata-jpa-registry/src/main/resources/registry-derby.sql
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/resources/registry-derby.sql
b/modules/registry/airavata-jpa-registry/src/main/resources/registry-derby.sql
index 9ea8c37..7ab3755 100644
--- a/modules/registry/airavata-jpa-registry/src/main/resources/registry-derby.sql
+++ b/modules/registry/airavata-jpa-registry/src/main/resources/registry-derby.sql
@@ -91,6 +91,7 @@ CREATE TABLE EXPERIMENT
         WORKFLOW_TEMPLATE_VERSION VARCHAR(255),
         WORKFLOW_EXECUTION_ID VARCHAR(255),
         ALLOW_NOTIFICATION SMALLINT,
+        GATEWAY_EXECUTION_ID VARCHAR(255),
         PRIMARY KEY(EXPERIMENT_ID),
         FOREIGN KEY (GATEWAY_ID) REFERENCES GATEWAY(GATEWAY_ID) ON DELETE CASCADE,
         FOREIGN KEY (EXECUTION_USER) REFERENCES USERS(USER_NAME) ON DELETE CASCADE,
@@ -263,6 +264,8 @@ CREATE TABLE JOB_DETAIL
         JOB_DESCRIPTION CLOB NOT NULL,
         CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
         COMPUTE_RESOURCE_CONSUMED VARCHAR(255),
+        JOBNAME VARCHAR (255),
+        WORKING_DIR VARCHAR(255),
         PRIMARY KEY (TASK_ID, JOB_ID),
         FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE
 );

http://git-wip-us.apache.org/repos/asf/airavata/blob/9cadde8e/modules/registry/airavata-jpa-registry/src/main/resources/registry-mysql.sql
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/resources/registry-mysql.sql
b/modules/registry/airavata-jpa-registry/src/main/resources/registry-mysql.sql
index 33db1d5..14d7fc8 100644
--- a/modules/registry/airavata-jpa-registry/src/main/resources/registry-mysql.sql
+++ b/modules/registry/airavata-jpa-registry/src/main/resources/registry-mysql.sql
@@ -91,6 +91,7 @@ CREATE TABLE EXPERIMENT
         WORKFLOW_TEMPLATE_VERSION VARCHAR(255),
         WORKFLOW_EXECUTION_ID VARCHAR(255),
         ALLOW_NOTIFICATION SMALLINT,
+        GATEWAY_EXECUTION_ID VARCHAR(255),
         PRIMARY KEY(EXPERIMENT_ID),
         FOREIGN KEY (GATEWAY_ID) REFERENCES GATEWAY(GATEWAY_ID) ON DELETE CASCADE,
         FOREIGN KEY (EXECUTION_USER) REFERENCES USERS(USER_NAME) ON DELETE CASCADE,
@@ -242,6 +243,8 @@ CREATE TABLE JOB_DETAIL
         JOB_DESCRIPTION LONGTEXT NOT NULL,
         CREATION_TIME TIMESTAMP DEFAULT NOW(),
         COMPUTE_RESOURCE_CONSUMED VARCHAR(255),
+        JOBNAME VARCHAR (255),
+        WORKING_DIR VARCHAR(255),
         PRIMARY KEY (TASK_ID, JOB_ID),
         FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE
 );

http://git-wip-us.apache.org/repos/asf/airavata/blob/9cadde8e/modules/registry/airavata-jpa-registry/src/test/resources/registry-derby.sql
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/test/resources/registry-derby.sql
b/modules/registry/airavata-jpa-registry/src/test/resources/registry-derby.sql
index 9ea8c37..7ab3755 100644
--- a/modules/registry/airavata-jpa-registry/src/test/resources/registry-derby.sql
+++ b/modules/registry/airavata-jpa-registry/src/test/resources/registry-derby.sql
@@ -91,6 +91,7 @@ CREATE TABLE EXPERIMENT
         WORKFLOW_TEMPLATE_VERSION VARCHAR(255),
         WORKFLOW_EXECUTION_ID VARCHAR(255),
         ALLOW_NOTIFICATION SMALLINT,
+        GATEWAY_EXECUTION_ID VARCHAR(255),
         PRIMARY KEY(EXPERIMENT_ID),
         FOREIGN KEY (GATEWAY_ID) REFERENCES GATEWAY(GATEWAY_ID) ON DELETE CASCADE,
         FOREIGN KEY (EXECUTION_USER) REFERENCES USERS(USER_NAME) ON DELETE CASCADE,
@@ -263,6 +264,8 @@ CREATE TABLE JOB_DETAIL
         JOB_DESCRIPTION CLOB NOT NULL,
         CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
         COMPUTE_RESOURCE_CONSUMED VARCHAR(255),
+        JOBNAME VARCHAR (255),
+        WORKING_DIR VARCHAR(255),
         PRIMARY KEY (TASK_ID, JOB_ID),
         FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE
 );


Mime
View raw message