airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lah...@apache.org
Subject git commit: fixng output handling for uri types
Date Wed, 28 May 2014 19:33:28 GMT
Repository: airavata
Updated Branches:
  refs/heads/master c072a3965 -> 79ea2f164


fixng output handling for uri types


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

Branch: refs/heads/master
Commit: 79ea2f1640b53becd8cbecc76ec21a5f28afdd14
Parents: c072a39
Author: lahiru <lahiru@apache.org>
Authored: Wed May 28 15:33:14 2014 -0400
Committer: lahiru <lahiru@apache.org>
Committed: Wed May 28 15:33:14 2014 -0400

----------------------------------------------------------------------
 .../gfac/gsissh/handler/GSISSHOutputHandler.java      | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/79ea2f16/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHOutputHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHOutputHandler.java
b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHOutputHandler.java
index b59625d..048357f 100644
--- a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHOutputHandler.java
+++ b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHOutputHandler.java
@@ -31,6 +31,7 @@ import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.common.utils.Constants;
 import org.apache.airavata.commons.gfac.type.ActualParameter;
 import org.apache.airavata.commons.gfac.type.ApplicationDescription;
+import org.apache.airavata.commons.gfac.type.MappingFactory;
 import org.apache.airavata.gfac.GFacException;
 import org.apache.airavata.gfac.core.context.JobExecutionContext;
 import org.apache.airavata.gfac.core.handler.AbstractHandler;
@@ -155,7 +156,7 @@ public class GSISSHOutputHandler extends AbstractHandler {
             detail.setTransferDescription("STDERR:" + stdErrStr);
             registry.add(ChildDataType.DATA_TRANSFER_DETAIL, detail, jobExecutionContext.getTaskData().getTaskID());
 
-
+            //todo this is a mess we have to fix this
             List<DataObjectType> outputArray = new ArrayList<DataObjectType>();
             Map<String, Object> output = jobExecutionContext.getOutMessageContext().getParameters();
             Set<String> keys = output.keySet();
@@ -166,11 +167,14 @@ public class GSISSHOutputHandler extends AbstractHandler {
                     List<String> outputList = cluster.listDirectory(app.getOutputDataDirectory());
                     if (outputList.size() == 0 || outputList.get(0).isEmpty()) {
                         OutputUtils.fillOutputFromStdout1(output, stdOutStr, stdErrStr, outputArray);
-                        for (DataObjectType outputLocation : outputArray){
-                        	  jobExecutionContext.addOutputFile(outputLocation.getValue());
-                              
+                        Map<String, ActualParameter> stringActualParameterMap = OutputUtils.fillOutputFromStdout(output,
stdOutStr, stdErrStr);
+                        Set<String> strings = stringActualParameterMap.keySet();
+                        for(String key:strings) {
+                            ActualParameter actualParameter1 = stringActualParameterMap.get(key);
+                            if("URI".equals(actualParameter1.getType().getType().toString())){
+                                jobExecutionContext.addOutputFile(MappingFactory.toString(actualParameter1));
+                            }
                         }
-                        OutputUtils.fillOutputFromStdout(output, stdOutStr, stdErrStr);
                         break;
                     } else {
                         String valueList = outputList.get(0);


Mime
View raw message