airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ramin...@apache.org
Subject svn commit: r1446718 - /airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GridFTPOutputHandler.java
Date Fri, 15 Feb 2013 18:37:32 GMT
Author: raminder
Date: Fri Feb 15 18:37:32 2013
New Revision: 1446718

URL: http://svn.apache.org/r1446718
Log:
Added support to get file output from outputData folder. AIRAVATA-765

Modified:
    airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GridFTPOutputHandler.java

Modified: airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GridFTPOutputHandler.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GridFTPOutputHandler.java?rev=1446718&r1=1446717&r2=1446718&view=diff
==============================================================================
--- airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GridFTPOutputHandler.java
(original)
+++ airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/handler/GridFTPOutputHandler.java
Fri Feb 15 18:37:32 2013
@@ -97,13 +97,20 @@ public class GridFTPOutputHandler implem
                             ((URIArrayType) actualParameter.getType()).setValueArray(valueList);
                             stringMap = new HashMap<String, ActualParameter>();
                             stringMap.put(paramName, actualParameter);
-                        }
-                        if ("StringArray".equals(actualParameter.getType().getType().toString()))
{
+                        }else if ("StringArray".equals(actualParameter.getType().getType().toString()))
{
                             String[] valueList = OutputUtils.parseStdoutArray(stdout, paramName);
                             ((StringArrayType) actualParameter.getType()).setValueArray(valueList);
                             stringMap = new HashMap<String, ActualParameter>();
                             stringMap.put(paramName, actualParameter);
-                        } else {
+                        } else if ("URI".equals(actualParameter.getType().getType().toString()))
{
+                            URI outputURI = GFacUtils.createGsiftpURI(endpoint, app.getOutputDataDirectory());
+                            List<String> outputList = ftp.listDir(outputURI, gssCred);
+                            String valueList = outputList.get(0);
+                            ((URIParameterType) actualParameter.getType()).setValue(valueList);
+                            stringMap = new HashMap<String, ActualParameter>();
+                            stringMap.put(paramName, actualParameter);
+                        }
+                        else {
                             // This is to handle exception during the output parsing.
                             stringMap = OutputUtils.fillOutputFromStdout(jobExecutionContext,
stdout, stderr);
                         }



Mime
View raw message