airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From samin...@apache.org
Subject git commit: https://issues.apache.org/jira/browse/AIRAVATA-1309
Date Wed, 02 Jul 2014 17:57:08 GMT
Repository: airavata
Updated Branches:
  refs/heads/master 54d02d48f -> 85348aec9


https://issues.apache.org/jira/browse/AIRAVATA-1309


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

Branch: refs/heads/master
Commit: 85348aec99e734b8c0e49b1771ac06af3a9578f4
Parents: 54d02d4
Author: Saminda Wijeratne <samindaw@gmail.com>
Authored: Wed Jul 2 13:56:56 2014 -0400
Committer: Saminda Wijeratne <samindaw@gmail.com>
Committed: Wed Jul 2 13:56:56 2014 -0400

----------------------------------------------------------------------
 .../model/util/ExperimentModelUtil.java         | 33 ++++++++++++++++++++
 .../experimentModel.thrift                      | 23 +++++++-------
 .../registry/jpa/impl/ExperimentRegistry.java   |  4 +--
 .../registry/jpa/model/TaskDetail.java          | 25 +++++----------
 .../jpa/resources/TaskDetailResource.java       | 24 +++++---------
 .../registry/jpa/resources/Utils.java           |  3 +-
 .../jpa/utils/ThriftDataModelConversion.java    |  3 +-
 .../src/main/resources/registry-derby.sql       |  3 +-
 .../src/main/resources/registry-mysql.sql       |  3 +-
 9 files changed, 66 insertions(+), 55 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/85348aec/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 2ac23f7..1b53d38 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
@@ -142,6 +142,39 @@ public class ExperimentModelUtil {
         return taskDetails;
     }
 
+    public static TaskDetails cloneTaskFromWorkflowNodeDetails(Experiment experiment, WorkflowNodeDetails
nodeDetails){
+        TaskDetails taskDetails = new TaskDetails();
+        taskDetails.setCreationTime(nodeDetails.getCreationTime());
+        String[] split = nodeDetails.getExecutionUnitData().split("/");
+        taskDetails.setApplicationId(split[0]);
+        taskDetails.setApplicationVersion(split[1]);
+        List<DataObjectType> experimentInputs = nodeDetails.getNodeInputs();
+        if (experimentInputs != null){
+            taskDetails.setApplicationInputs(experimentInputs);
+        }
+
+        List<DataObjectType> experimentOutputs = nodeDetails.getNodeOutputs();
+        if (experimentOutputs != null){
+            taskDetails.setApplicationOutputs(experimentOutputs);
+        }
+
+        UserConfigurationData configData = experiment.getUserConfigurationData();
+        if (configData != null){
+            ComputationalResourceScheduling scheduling = configData.getComputationalResourceScheduling();
+            if (scheduling != null){
+                taskDetails.setTaskScheduling(scheduling);
+            }
+            AdvancedInputDataHandling advanceInputDataHandling = configData.getAdvanceInputDataHandling();
+            if (advanceInputDataHandling != null){
+                taskDetails.setAdvancedInputDataHandling(advanceInputDataHandling);
+            }
+            AdvancedOutputDataHandling outputHandling = configData.getAdvanceOutputDataHandling();
+            if (outputHandling != null){
+                taskDetails.setAdvancedOutputDataHandling(outputHandling);
+            }
+        }
+        return taskDetails;
+    }
     public static WorkflowNodeDetails createWorkflowNode (String nodeName,
                                                           List<DataObjectType> nodeInputs){
         WorkflowNodeDetails wfnod = new WorkflowNodeDetails();

http://git-wip-us.apache.org/repos/asf/airavata/blob/85348aec/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 a8bff9d..295720a 100644
--- a/airavata-api/thrift-interface-descriptions/experimentModel.thrift
+++ b/airavata-api/thrift-interface-descriptions/experimentModel.thrift
@@ -63,6 +63,7 @@ enum ExperimentState {
     EXECUTING,
     CANCELING,
     CANCELED,
+    SUSPENDED,
     COMPLETED,
     FAILED,
     UNKNOWN
@@ -78,6 +79,7 @@ enum WorkflowNodeState {
     EXECUTING,
     CANCELING,
     CANCELED,
+    SUSPENDED,
     COMPLETED,
     FAILED,
     UNKNOWN
@@ -301,17 +303,16 @@ struct TaskDetails {
     2: optional i64 creationTime,
     3: optional string applicationId,
     4: optional string applicationVersion,
-    5: optional string hostDescriptorId,
-    6: optional string applicationDescriptorId,
-    7: optional list<DataObjectType> applicationInputs,
-    8: optional list<DataObjectType> applicationOutputs,
-    9: optional ComputationalResourceScheduling taskScheduling,
-    10: optional AdvancedInputDataHandling advancedInputDataHandling,
-    11: optional AdvancedOutputDataHandling advancedOutputDataHandling,
-    12: optional TaskStatus taskStatus,
-    13: optional list<JobDetails> jobDetailsList,
-    14: optional list<DataTransferDetails> dataTransferDetailsList,
-    15: optional list<ErrorDetails> errors
+    5: optional string applicationDeploymentId,
+    6: optional list<DataObjectType> applicationInputs,
+    7: optional list<DataObjectType> applicationOutputs,
+    8: optional ComputationalResourceScheduling taskScheduling,
+    9: optional AdvancedInputDataHandling advancedInputDataHandling,
+    10: optional AdvancedOutputDataHandling advancedOutputDataHandling,
+    11: optional TaskStatus taskStatus,
+    12: optional list<JobDetails> jobDetailsList,
+    13: optional list<DataTransferDetails> dataTransferDetailsList,
+    14: optional list<ErrorDetails> errors
 }
 
 enum ExecutionUnit {

http://git-wip-us.apache.org/repos/asf/airavata/blob/85348aec/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 7ca3141..094329f 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
@@ -905,8 +905,8 @@ public class ExperimentRegistry {
             taskDetail.setApplicationId(taskDetails.getApplicationId());
             taskDetail.setApplicationVersion(taskDetails.getApplicationVersion());
             taskDetail.setCreationTime(AiravataUtils.getTime(taskDetails.getCreationTime()));
-            taskDetail.setHostDescriptorId(taskDetails.getHostDescriptorId());
-            taskDetail.setApplicationDescriptorId(taskDetails.getApplicationDescriptorId());
+            taskDetail.setApplicationDeploymentId(taskDetails.getApplicationDeploymentId());
+
             taskDetail.save();
             List<DataObjectType> applicationInputs = taskDetails.getApplicationInputs();
             if (applicationInputs != null) {

http://git-wip-us.apache.org/repos/asf/airavata/blob/85348aec/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/TaskDetail.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/TaskDetail.java
b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/TaskDetail.java
index 5d0e6b2..07f700a 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/TaskDetail.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/model/TaskDetail.java
@@ -24,6 +24,7 @@ package org.apache.airavata.persistance.registry.jpa.model;
 import org.apache.openjpa.persistence.DataCache;
 
 import javax.persistence.*;
+
 import java.io.Serializable;
 import java.sql.Timestamp;
 
@@ -43,11 +44,9 @@ public class TaskDetail implements Serializable {
     @Column(name = "APPLICATION_VERSION")
     private String appVersion;
 
-    @Column(name = "HOST_ID")
-    private String hostDescriptorId;
-    @Column(name = "APPLICATION_DESC_ID")
-    private String applicationDescriptorId;
-    
+    @Column(name = "APPLICATION_DEPLOYMENT_ID")
+    private String applicationDeploymentId;
+
     @ManyToOne(cascade= CascadeType.MERGE)
     @JoinColumn(name = "NODE_INSTANCE_ID")
     private WorkflowNodeDetail nodeDetail;
@@ -100,19 +99,11 @@ public class TaskDetail implements Serializable {
         this.nodeDetail = nodeDetail;
     }
 
-	public String getHostDescriptorId() {
-		return hostDescriptorId;
-	}
-
-	public void setHostDescriptorId(String hostDescriptorId) {
-		this.hostDescriptorId = hostDescriptorId;
-	}
-
-	public String getApplicationDescriptorId() {
-		return applicationDescriptorId;
+	public String getApplicationDeploymentId() {
+		return applicationDeploymentId;
 	}
 
-	public void setApplicationDescriptorId(String applicationDescriptorId) {
-		this.applicationDescriptorId = applicationDescriptorId;
+	public void setApplicationDeploymentId(String applicationDeploymentId) {
+		this.applicationDeploymentId = applicationDeploymentId;
 	}
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/85348aec/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/TaskDetailResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/TaskDetailResource.java
b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/TaskDetailResource.java
index bc7ee1f..a66ab79 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/TaskDetailResource.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/resources/TaskDetailResource.java
@@ -45,9 +45,8 @@ public class TaskDetailResource extends AbstractResource {
     private Timestamp creationTime;
     private String applicationId;
     private String applicationVersion;
-    private String hostDescriptorId;
-    private String applicationDescriptorId;
-
+    private String applicationDeploymentId;
+    
     public String getTaskId() {
         return taskId;
     }
@@ -502,8 +501,7 @@ public class TaskDetailResource extends AbstractResource {
 		taskDetail.setCreationTime(creationTime);
 		taskDetail.setAppId(applicationId);
 		taskDetail.setAppVersion(applicationVersion);
-		taskDetail.setHostDescriptorId(getHostDescriptorId());
-		taskDetail.setApplicationDescriptorId(getApplicationDescriptorId());
+		taskDetail.setApplicationDeploymentId(getApplicationDeploymentId());
 	}
 
     public List<ApplicationInputResource> getApplicationInputs() throws RegistryException{
@@ -600,19 +598,11 @@ public class TaskDetailResource extends AbstractResource {
         return isExists(ResourceType.STATUS, taskId);
     }
 
-	public String getApplicationDescriptorId() {
-		return applicationDescriptorId;
-	}
-
-	public void setApplicationDescriptorId(String applicationDescriptorId) {
-		this.applicationDescriptorId = applicationDescriptorId;
-	}
-
-	public String getHostDescriptorId() {
-		return hostDescriptorId;
+	public String getApplicationDeploymentId() {
+		return applicationDeploymentId;
 	}
 
-	public void setHostDescriptorId(String hostDescriptorId) {
-		this.hostDescriptorId = hostDescriptorId;
+	public void setApplicationDeploymentId(String applicationDeploymentId) {
+		this.applicationDeploymentId = applicationDeploymentId;
 	}
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/85348aec/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 b46f8c4..352cfa4 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
@@ -639,8 +639,7 @@ public class Utils {
             taskDetailResource.setTaskId(o.getTaskId());
             taskDetailResource.setApplicationId(o.getAppId());
             taskDetailResource.setApplicationVersion(o.getAppVersion());
-            taskDetailResource.setHostDescriptorId(o.getHostDescriptorId());
-            taskDetailResource.setApplicationDescriptorId(o.getApplicationDescriptorId());
+            taskDetailResource.setApplicationDeploymentId(o.getApplicationDeploymentId());
         }
         return taskDetailResource;
     }

http://git-wip-us.apache.org/repos/asf/airavata/blob/85348aec/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 5085f4d..26f5dc4 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
@@ -427,8 +427,7 @@ public class ThriftDataModelConversion {
             taskDetails.setApplicationInputs(getApplicationInputs(applicationInputs));
             List<ApplicationOutputResource> applicationOutputs = taskDetailResource.getApplicationOutputs();
             taskDetails.setApplicationOutputs(getApplicationOutputs(applicationOutputs));
-            taskDetails.setHostDescriptorId(taskDetailResource.getHostDescriptorId());
-            taskDetails.setApplicationDescriptorId(taskDetailResource.getApplicationDescriptorId());
+            taskDetails.setApplicationDeploymentId(taskDetailResource.getApplicationDeploymentId());
             if (taskDetailResource.isExists(ResourceType.COMPUTATIONAL_RESOURCE_SCHEDULING,
taskId)){
                 ComputationSchedulingResource computationScheduling = taskDetailResource.getComputationScheduling(taskId);
                 taskDetails.setTaskScheduling(getComputationalResourceScheduling(computationScheduling));

http://git-wip-us.apache.org/repos/asf/airavata/blob/85348aec/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 3cd75c1..f7b530a 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
@@ -198,8 +198,7 @@ CREATE TABLE TASK_DETAIL
         CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
         APPLICATION_ID VARCHAR(255),
         APPLICATION_VERSION VARCHAR(255),
-        HOST_ID VARCHAR(255),
-        APPLICATION_DESC_ID VARCHAR(255),
+        APPLICATION_DEPLOYMENT_ID VARCHAR(255),
         PRIMARY KEY(TASK_ID),
         FOREIGN KEY (NODE_INSTANCE_ID) REFERENCES WORKFLOW_NODE_DETAIL(NODE_INSTANCE_ID)
ON DELETE CASCADE
 );

http://git-wip-us.apache.org/repos/asf/airavata/blob/85348aec/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 68c0f7b..f689540 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
@@ -197,8 +197,7 @@ CREATE TABLE TASK_DETAIL
         CREATION_TIME TIMESTAMP DEFAULT NOW(),
         APPLICATION_ID VARCHAR(255),
         APPLICATION_VERSION VARCHAR(255),
-        HOST_ID VARCHAR(255),
-        APPLICATION_DESC_ID VARCHAR(255),
+        APPLICATION_DEPLOYMENT_ID VARCHAR(255),
         PRIMARY KEY(TASK_ID),
         FOREIGN KEY (NODE_INSTANCE_ID) REFERENCES WORKFLOW_NODE_DETAIL(NODE_INSTANCE_ID)
ON DELETE CASCADE
 );


Mime
View raw message