airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scnakand...@apache.org
Subject airavata git commit: tasks are created in Orchestrator. So changing the orchestrator
Date Thu, 07 Jan 2016 05:30:13 GMT
Repository: airavata
Updated Branches:
  refs/heads/master d959615ed -> 51ba07196


tasks are created in Orchestrator. So changing the orchestrator


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

Branch: refs/heads/master
Commit: 51ba07196a8da56c963651fe0e32b95174d296ba
Parents: d959615
Author: scnakandala <supun.nakandala@gmail.com>
Authored: Thu Jan 7 00:30:09 2016 -0500
Committer: scnakandala <supun.nakandala@gmail.com>
Committed: Thu Jan 7 00:30:09 2016 -0500

----------------------------------------------------------------------
 .../cpi/impl/SimpleOrchestratorImpl.java            | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/51ba0719/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java
b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java
index 2f69dfd..fce6b84 100644
--- a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java
+++ b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java
@@ -554,7 +554,21 @@ public class SimpleOrchestratorImpl extends AbstractOrchestrator{
             taskModel.setTaskType(TaskTypes.DATA_STAGING);
             ComputeResourcePreference computeResourcePreference = OrchestratorUtils.getComputeResourcePreference(orchestratorContext,
processModel, gatewayId);
             ComputeResourceDescription computeResource = orchestratorContext.getRegistry().getAppCatalog().getComputeResource().getComputeResource(processModel.getComputeResourceId());
-            String remoteOutputDir = computeResourcePreference.getScratchLocation() + File.separator
+ processModel.getProcessId();
+
+            String experimentDataDir = processModel.getExperimentDataDir();
+            String remoteOutputDir;
+            if(experimentDataDir != null && !experimentDataDir.isEmpty()) {
+                if(experimentDataDir.startsWith(File.separator)){
+                    experimentDataDir = experimentDataDir.substring(1);
+                }
+                if(!experimentDataDir.endsWith(File.separator)){
+                    experimentDataDir += File.separator;
+                }
+                remoteOutputDir = computeResourcePreference.getScratchLocation() + File.separator
+
+                        experimentDataDir + processModel.getProcessId();
+            } else {
+                remoteOutputDir = computeResourcePreference.getScratchLocation() + File.separator
+ processModel.getProcessId();
+            }
             remoteOutputDir = remoteOutputDir.endsWith("/") ? remoteOutputDir : remoteOutputDir
+ "/";
             DataStagingTaskModel submodel = new DataStagingTaskModel();
             submodel.setType(DataStageType.OUPUT);


Mime
View raw message