airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject airavata git commit: adding storageId to experiment and process
Date Tue, 24 Nov 2015 15:43:12 GMT
Repository: airavata
Updated Branches:
  refs/heads/develop bb5be4b5e -> 0de9433c0


adding storageId to experiment and process


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/0de9433c
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/0de9433c
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/0de9433c

Branch: refs/heads/develop
Commit: 0de9433c035e0fbf715f66e3fd60b34f9e7774ea
Parents: bb5be4b
Author: Chathuri Wimalasena <chathuri@apache.org>
Authored: Tue Nov 24 10:43:07 2015 -0500
Committer: Chathuri Wimalasena <chathuri@apache.org>
Committed: Tue Nov 24 10:43:07 2015 -0500

----------------------------------------------------------------------
 .../apache/airavata/model/util/ExperimentModelUtil.java   |  1 +
 .../core/experiment/catalog/impl/ExperimentRegistry.java  |  2 ++
 .../registry/core/experiment/catalog/model/Process.java   | 10 ++++++++++
 .../experiment/catalog/model/UserConfigurationData.java   |  2 +-
 .../experiment/catalog/resources/ProcessResource.java     | 10 ++++++++++
 .../catalog/resources/UserConfigurationDataResource.java  |  1 +
 .../registry/core/experiment/catalog/resources/Utils.java |  2 ++
 .../catalog/utils/ThriftDataModelConversion.java          |  2 ++
 .../registry-core/src/main/resources/expcatalog-derby.sql |  2 ++
 .../registry-core/src/main/resources/expcatalog-mysql.sql |  3 +++
 10 files changed, 34 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/0de9433c/airavata-api/airavata-model-utils/src/main/java/org/apache/airavata/model/util/ExperimentModelUtil.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-model-utils/src/main/java/org/apache/airavata/model/util/ExperimentModelUtil.java
b/airavata-api/airavata-model-utils/src/main/java/org/apache/airavata/model/util/ExperimentModelUtil.java
index 4faa4e7..bf357c6 100644
--- a/airavata-api/airavata-model-utils/src/main/java/org/apache/airavata/model/util/ExperimentModelUtil.java
+++ b/airavata-api/airavata-model-utils/src/main/java/org/apache/airavata/model/util/ExperimentModelUtil.java
@@ -97,6 +97,7 @@ public class ExperimentModelUtil {
 
         UserConfigurationDataModel configData = experiment.getUserConfigurationData();
         if (configData != null){
+            processModel.setStorageResourceId(configData.getStorageId());
             ComputationalResourceSchedulingModel scheduling = configData.getComputationalResourceScheduling();
             if (scheduling != null){
                 processModel.setResourceSchedule(scheduling);

http://git-wip-us.apache.org/repos/asf/airavata/blob/0de9433c/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentRegistry.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentRegistry.java
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentRegistry.java
index 6fa6c4e..a590b08 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentRegistry.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/impl/ExperimentRegistry.java
@@ -145,6 +145,7 @@ public class ExperimentRegistry {
             configDataResource.setWallTimeLimit(configurationData.getComputationalResourceScheduling().getWallTimeLimit());
             configDataResource.setTotalPhysicalMemory(configurationData.getComputationalResourceScheduling().getTotalPhysicalMemory());
             configDataResource.setStaticWorkingDir(configurationData.getComputationalResourceScheduling().getStaticWorkingDir());
+            configDataResource.setStorageId(configurationData.getStorageId());
             configDataResource.save();
         } catch (Exception e) {
             logger.error("Unable to save user config data", e);
@@ -690,6 +691,7 @@ public class ExperimentRegistry {
             configDataResource.setThrottleResources(configurationData.isThrottleResources());
             configDataResource.setUserDn(configurationData.getUserDN());
             configDataResource.setGenerateCert(configurationData.isGenerateCert());
+            configDataResource.setStorageId(configurationData.getStorageId());
             configDataResource.setResourceHostId(configurationData.getComputationalResourceScheduling().getResourceHostId());
             configDataResource.setTotalCpuCount(configurationData.getComputationalResourceScheduling().getTotalCPUCount());
             configDataResource.setNodeCount(configurationData.getComputationalResourceScheduling().getNodeCount());

http://git-wip-us.apache.org/repos/asf/airavata/blob/0de9433c/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Process.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Process.java
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Process.java
index 5e429d1..1e8bc98 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Process.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/Process.java
@@ -43,6 +43,7 @@ public class Process {
     private String gatewayExecutionId;
     private boolean enableEmailNotification;
     private String emailAddresses;
+    private String storageId;
     private Experiment experiment;
     private Collection<ProcessError> processErrors;
     private Collection<ProcessInput> processInputs;
@@ -107,6 +108,15 @@ public class Process {
         this.applicationInterfaceId = applicationInterfaceId;
     }
 
+    @Column(name = "STORAGE_RESOURCE_ID")
+    public String getStorageId() {
+        return storageId;
+    }
+
+    public void setStorageId(String storageId) {
+        this.storageId = storageId;
+    }
+
     @Lob
     @Column(name = "TASK_DAG")
     public String getTaskDag() {

http://git-wip-us.apache.org/repos/asf/airavata/blob/0de9433c/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/UserConfigurationData.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/UserConfigurationData.java
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/UserConfigurationData.java
index 73c2b8d..d72a8b7 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/UserConfigurationData.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/UserConfigurationData.java
@@ -183,7 +183,7 @@ public class UserConfigurationData {
         this.staticWorkingDir = staticWorkingDir;
     }
 
-    @Column(name = "ST")
+    @Column(name = "STORAGE_RESOURCE_ID")
     public String getStorageId() {
         return storageId;
     }

http://git-wip-us.apache.org/repos/asf/airavata/blob/0de9433c/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ProcessResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ProcessResource.java
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ProcessResource.java
index 57d3408..611be62 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ProcessResource.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ProcessResource.java
@@ -51,6 +51,7 @@ public class ProcessResource extends AbstractExpCatResource {
     private String gatewayExecutionId;
     private boolean enableEmailNotification;
     private String emailAddresses;
+    private String storageResourceId;
 
     public String getProcessId() {
         return processId;
@@ -148,6 +149,14 @@ public class ProcessResource extends AbstractExpCatResource {
         this.emailAddresses = emailAddresses;
     }
 
+    public String getStorageResourceId() {
+        return storageResourceId;
+    }
+
+    public void setStorageResourceId(String storageResourceId) {
+        this.storageResourceId = storageResourceId;
+    }
+
     public ExperimentCatResource create(ResourceType type) throws RegistryException{
        switch (type){
            case PROCESS_ERROR:
@@ -549,6 +558,7 @@ public class ProcessResource extends AbstractExpCatResource {
             process.setGatewayExecutionId(gatewayExecutionId);
             process.setEnableEmailNotification(enableEmailNotification);
             process.setEmailAddresses(emailAddresses);
+            process.setStorageId(storageResourceId);
             if (existingProcess == null){
                 em.persist(process);
             }else {

http://git-wip-us.apache.org/repos/asf/airavata/blob/0de9433c/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/UserConfigurationDataResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/UserConfigurationDataResource.java
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/UserConfigurationDataResource.java
index aa16a01..aebf9dc 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/UserConfigurationDataResource.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/UserConfigurationDataResource.java
@@ -241,6 +241,7 @@ public class UserConfigurationDataResource extends AbstractExpCatResource
{
             userConfigurationData.setWallTimeLimit(wallTimeLimit);
             userConfigurationData.setStaticWorkingDir(staticWorkingDir);
             userConfigurationData.setTotalPhysicalMemory(totalPhysicalMemory);
+            userConfigurationData.setStorageId(storageId);
             if (existingConf == null){
                 em.persist(userConfigurationData);
             }else {

http://git-wip-us.apache.org/repos/asf/airavata/blob/0de9433c/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/Utils.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/Utils.java
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/Utils.java
index 620c96f..bcaa071 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/Utils.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/Utils.java
@@ -512,6 +512,7 @@ public class Utils {
             configurationDataResource.setWallTimeLimit(o.getWallTimeLimit());
             configurationDataResource.setTotalPhysicalMemory(o.getTotalPhysicalMemory());
             configurationDataResource.setStaticWorkingDir(o.getStaticWorkingDir());
+            configurationDataResource.setStorageId(o.getStorageId());
         }
         return configurationDataResource;
     }
@@ -531,6 +532,7 @@ public class Utils {
             processResource.setApplicationDeploymentId(o.getApplicationDeploymentId());
             processResource.setEnableEmailNotification(o.getEnableEmailNotification());
             processResource.setEmailAddresses(o.getEmailAddresses());
+            processResource.setStorageResourceId(o.getStorageId());
         }
         return processResource;
     }

http://git-wip-us.apache.org/repos/asf/airavata/blob/0de9433c/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/utils/ThriftDataModelConversion.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/utils/ThriftDataModelConversion.java
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/utils/ThriftDataModelConversion.java
index d66c780..41f92c0 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/utils/ThriftDataModelConversion.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/utils/ThriftDataModelConversion.java
@@ -371,6 +371,7 @@ public class ThriftDataModelConversion {
                 processModel.setResourceSchedule(schedule);
             }
             processModel.setTasks(getTaskModelList(processResource.getTaskList()));
+            processModel.setStorageResourceId(processResource.getStorageResourceId());
             return processModel;
         }
         return null;
@@ -493,6 +494,7 @@ public class ThriftDataModelConversion {
             data.setShareExperimentPublicly(resource.getShareExperimentPublically());
             data.setUserDN(resource.getUserDn());
             data.setGenerateCert(resource.getGenerateCert());
+            data.setStorageId(resource.getStorageId());
 
             ComputationalResourceSchedulingModel resourceSchedulingModel = new ComputationalResourceSchedulingModel();
             resourceSchedulingModel.setResourceHostId(resource.getResourceHostId());

http://git-wip-us.apache.org/repos/asf/airavata/blob/0de9433c/modules/registry/registry-core/src/main/resources/expcatalog-derby.sql
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/resources/expcatalog-derby.sql b/modules/registry/registry-core/src/main/resources/expcatalog-derby.sql
index 90e99c3..1f69088 100644
--- a/modules/registry/registry-core/src/main/resources/expcatalog-derby.sql
+++ b/modules/registry/registry-core/src/main/resources/expcatalog-derby.sql
@@ -159,6 +159,7 @@ CREATE TABLE USER_CONFIGURATION_DATA (
   WALL_TIME_LIMIT INT,
   TOTAL_PHYSICAL_MEMORY INT,
   STATIC_WORKING_DIR varchar(255),
+  STORAGE_RESOURCE_ID varchar(255),
   PRIMARY KEY (EXPERIMENT_ID),
   FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE
 );
@@ -189,6 +190,7 @@ CREATE TABLE PROCESS (
   GATEWAY_EXECUTION_ID varchar(255),
   ENABLE_EMAIL_NOTIFICATION SMALLINT,
   EMAIL_ADDRESSES CLOB,
+  STORAGE_RESOURCE_ID varchar(255),
   PRIMARY KEY (PROCESS_ID),
   FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE
 );

http://git-wip-us.apache.org/repos/asf/airavata/blob/0de9433c/modules/registry/registry-core/src/main/resources/expcatalog-mysql.sql
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/resources/expcatalog-mysql.sql b/modules/registry/registry-core/src/main/resources/expcatalog-mysql.sql
index 92c5251..f14f0b3 100644
--- a/modules/registry/registry-core/src/main/resources/expcatalog-mysql.sql
+++ b/modules/registry/registry-core/src/main/resources/expcatalog-mysql.sql
@@ -158,6 +158,8 @@ CREATE TABLE USER_CONFIGURATION_DATA (
   QUEUE_NAME varchar(255),
   WALL_TIME_LIMIT int(11),
   TOTAL_PHYSICAL_MEMORY int(11),
+  STATIC_WORKING_DIR varchar(255),
+  STORAGE_RESOURCE_ID varchar(255),
   PRIMARY KEY (EXPERIMENT_ID),
   FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE
 );
@@ -190,6 +192,7 @@ CREATE TABLE PROCESS (
   GATEWAY_EXECUTION_ID varchar(255),
   ENABLE_EMAIL_NOTIFICATION BOOLEAN,
   EMAIL_ADDRESSES TEXT,
+  STORAGE_RESOURCE_ID varchar(255),
   PRIMARY KEY (PROCESS_ID),
   FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE
 );


Mime
View raw message