airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shame...@apache.org
Subject [48/53] [abbrv] airavata git commit: Changed data staging task to work with multiple inputs
Date Thu, 07 Jul 2016 19:30:34 GMT
Changed data staging task to work with multiple inputs


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

Branch: refs/heads/master
Commit: 73fee6be73c9265e637475e6c4443b895fe9556c
Parents: d20f77e
Author: Shameera Rathnayaka <shameerainfo@gmail.com>
Authored: Wed Jul 6 14:31:14 2016 -0400
Committer: Shameera Rathnayaka <shameerainfo@gmail.com>
Committed: Wed Jul 6 14:32:05 2016 -0400

----------------------------------------------------------------------
 .../main/java/org/apache/airavata/gfac/impl/GFacEngineImpl.java  | 4 +++-
 .../java/org/apache/airavata/gfac/impl/task/DataStageTask.java   | 3 +--
 .../org/apache/airavata/gfac/impl/task/SCPDataStageTask.java     | 3 +--
 3 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/73fee6be/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/GFacEngineImpl.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/GFacEngineImpl.java
b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/GFacEngineImpl.java
index 3fb95e0..f64e521 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/GFacEngineImpl.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/GFacEngineImpl.java
@@ -529,7 +529,7 @@ public class GFacEngineImpl implements GFacEngine {
         return false;
     }
 
-    private boolean inputDataStaging(TaskContext taskContext, boolean recover) throws GFacException
{
+    private boolean inputDataStaging(TaskContext taskContext, boolean recover) throws GFacException,
TException {
         TaskStatus taskStatus = new TaskStatus(TaskState.EXECUTING);
         taskStatus.setTimeOfStateChange(AiravataUtils.getCurrentTimestamp().getTime());
         taskContext.setTaskStatus(taskStatus);
@@ -541,8 +541,10 @@ public class GFacEngineImpl implements GFacEngine {
         if (taskContext.getProcessInput().getType() == DataType.URI_COLLECTION) {
             String values = taskContext.getProcessInput().getValue();
             String[] multiple_inputs = values.split(GFacConstants.MULTIPLE_INPUTS_SPLITTER);
+            DataStagingTaskModel subTaskModel = (DataStagingTaskModel) taskContext.getSubTaskModel();
             for (String input : multiple_inputs) {
                 taskContext.getProcessInput().setValue(input);
+                subTaskModel.setSource(input);
                 taskStatus = executeTask(taskContext, dMoveTask, false);
             }
             taskContext.getProcessInput().setValue(values);

http://git-wip-us.apache.org/repos/asf/airavata/blob/73fee6be/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/DataStageTask.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/DataStageTask.java
b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/DataStageTask.java
index ec3ffd7..69e8d77 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/DataStageTask.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/DataStageTask.java
@@ -56,8 +56,7 @@ public class DataStageTask implements Task {
 					+ taskContext.getTaskModel().getTaskType().toString());
 		} else {
 			try {
-				DataStagingTaskModel subTaskModel = (DataStagingTaskModel) ThriftUtils.getSubTaskModel(taskContext
-						.getTaskModel());
+				DataStagingTaskModel subTaskModel = ((DataStagingTaskModel) taskContext.getSubTaskModel());
 				URI sourceURI = new URI(subTaskModel.getSource());
 				URI destinationURI = new URI(subTaskModel.getDestination());
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/73fee6be/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/SCPDataStageTask.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/SCPDataStageTask.java
b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/SCPDataStageTask.java
index 17522e9..904d486 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/SCPDataStageTask.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/SCPDataStageTask.java
@@ -83,8 +83,7 @@ public class SCPDataStageTask implements Task {
         String localDataDir = null;
         ProcessState processState = taskContext.getParentProcessContext().getProcessState();
         try {
-            subTaskModel = (DataStagingTaskModel) ThriftUtils.getSubTaskModel
-                    (taskContext.getTaskModel());
+            subTaskModel = ((DataStagingTaskModel) taskContext.getSubTaskModel());
             if (processState == ProcessState.OUTPUT_DATA_STAGING) {
                 OutputDataObjectType processOutput = taskContext.getProcessOutput();
                 if (processOutput != null && processOutput.getValue() == null) {


Mime
View raw message