airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lah...@apache.org
Subject [55/62] [abbrv] airavata git commit: Fixed AIRAVATA-1631.
Date Thu, 19 Mar 2015 15:03:21 GMT
Fixed AIRAVATA-1631.

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

Branch: refs/heads/queue-gfac-rabbitmq
Commit: 5d7a034155f0acb48c15f1420c3ab452523f40ad
Parents: a4fb489
Author: raminder <raminder@apache.org>
Authored: Mon Mar 16 14:22:50 2015 -0400
Committer: raminder <raminder@apache.org>
Committed: Mon Mar 16 14:22:50 2015 -0400

----------------------------------------------------------------------
 .../airavata/gfac/core/cpi/BetterGfacImpl.java    | 18 +++++++++++++++---
 .../airavata/gfac/ssh/util/HandleOutputs.java     |  5 +----
 2 files changed, 16 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/5d7a0341/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
index 2ff0338..6b20118 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/BetterGfacImpl.java
@@ -385,10 +385,22 @@ public class BetterGfacImpl implements GFac,Watcher {
 
         for (OutputDataObjectType objectType : taskOutputs){
             if (objectType.getType() == DataType.URI && objectType.getValue() !=
null){
-                // this should be also the relatvie path : in case of clone, this will contain
full path
+                // this should be also the relative path : in case of clone, this will contain
full path
                 String filePath = objectType.getValue();
-                filePath = filePath.substring(filePath.lastIndexOf(File.separatorChar) +
1, filePath.length());
-                objectType.setValue(jobExecutionContext.getOutputDir() + File.separator +
filePath);
+                if(objectType.getLocation() == null && objectType.getLocation().isEmpty()
&& filePath.contains(File.separator)){
+                filePath = jobExecutionContext.getOutputDir() + File.separator + filePath.substring(filePath.lastIndexOf(File.separatorChar)
+ 1, filePath.length());
+                }
+                //output is not in working folder
+                if (objectType.getLocation() != null && !objectType.getLocation().isEmpty())
{
+                	if(objectType.getLocation().startsWith(File.separator)){
+                		filePath = objectType.getLocation() + File.separator + filePath;
+                    }else{
+                    	filePath = jobExecutionContext.getOutputDir() + File.separator + filePath;
+                    }
+                	filePath = objectType.getLocation()+ filePath;
+                }
+                objectType.setValue(filePath);
+                
             }
             if (objectType.getType() == DataType.STDOUT){
                 objectType.setValue(jobExecutionContext.getOutputDir() + File.separator +
jobExecutionContext.getApplicationName() + ".stdout");

http://git-wip-us.apache.org/repos/asf/airavata/blob/5d7a0341/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/HandleOutputs.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/HandleOutputs.java
b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/HandleOutputs.java
index e64b0be..ddab0f4 100644
--- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/HandleOutputs.java
+++ b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/HandleOutputs.java
@@ -37,12 +37,9 @@ public class HandleOutputs {
 					String outputFile = output.getValue();
 					String fileName = outputFile.substring(outputFile.lastIndexOf(File.separatorChar) +
1, outputFile.length());
 
-					if (!outputList.contains(fileName) && output.isIsRequired()) {
+					if (output.getLocation() == null && !outputList.contains(fileName) &&
output.isIsRequired()) {
 						missingOutput = true;
 					} else {
-						if (output.getLocation() != null && !output.getLocation().isEmpty()) {
-							outputFile = output.getLocation()+ fileName;
-						}
 						cluster.scpFrom(outputFile, outputDataDir);
 						String localFile = outputDataDir + File.separator + fileName;
 						jobExecutionContext.addOutputFile(localFile);


Mime
View raw message