airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ramin...@apache.org
Subject git commit: Fixed with current flags. With Application catalog intergration we will be able to provide a better fix. AIRAVATA-1449
Date Mon, 22 Sep 2014 16:17:57 GMT
Repository: airavata
Updated Branches:
  refs/heads/master 5996b5cc6 -> 6a11b29db


Fixed with current flags. With Application catalog intergration we will
be able to provide a better fix. AIRAVATA-1449

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

Branch: refs/heads/master
Commit: 6a11b29db44f88d5bc9a7b4b34b67b8277a6ac9a
Parents: 5996b5c
Author: raminder <raminder@apache.org>
Authored: Mon Sep 22 12:17:37 2014 -0400
Committer: raminder <raminder@apache.org>
Committed: Mon Sep 22 12:17:37 2014 -0400

----------------------------------------------------------------------
 .../apache/airavata/gfac/core/utils/OutputUtils.java    | 12 +++++-------
 .../gfac/gsissh/handler/GSISSHOutputHandler.java        |  2 ++
 .../gfac/ssh/handler/AdvancedSCPOutputHandler.java      |  3 +++
 .../airavata/gfac/ssh/handler/SSHOutputHandler.java     |  5 ++++-
 4 files changed, 14 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/6a11b29d/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/OutputUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/OutputUtils.java
b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/OutputUtils.java
index 3649946..4008721 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/OutputUtils.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/utils/OutputUtils.java
@@ -95,9 +95,8 @@ public class OutputUtils {
         if (match != null) {
             match = match.trim();
             return match;
-        } else {
-            throw new Exception("Data for the output parameter '" + outParam + "' was not
found");
-        }
+        } 
+        return null;
     }
 
     public static String[] parseStdoutArray(String stdout, String outParam) throws Exception
{
@@ -108,10 +107,9 @@ public class OutputUtils {
         while (matcher.find()) {
             match.append(matcher.group(1) + StringUtil.DELIMETER);
         }
-        if (match != null) {
+        if (match != null && match.length() >0) {
         	return StringUtil.getElementsFromString(match.toString());
-        } else {
-            throw new Exception("Data for the output parameter '" + outParam + "' was not
found");
-        }
+        } 
+        return null;
     }
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/6a11b29d/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 ee10187..9f15bd7 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
@@ -255,10 +255,12 @@ public class GSISSHOutputHandler extends AbstractRecoverableHandler
{
                 }
             }
             if (outputArray == null || outputArray.isEmpty()) {
+                if(jobExecutionContext.getTaskData().getAdvancedOutputDataHandling() == null){
                 throw new GFacHandlerException(
                         "Empty Output returned from the Application, Double check the application"
                                 + "and ApplicationDescriptor output Parameter Names"
                 );
+                }
             }
             app.setStandardError(localStdErrFile.getAbsolutePath());
             app.setStandardOutput(localStdOutFile.getAbsolutePath());

http://git-wip-us.apache.org/repos/asf/airavata/blob/6a11b29d/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPOutputHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPOutputHandler.java
b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPOutputHandler.java
index 193c2c5..e49ae30 100644
--- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPOutputHandler.java
+++ b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPOutputHandler.java
@@ -146,6 +146,9 @@ public class AdvancedSCPOutputHandler extends AbstractHandler {
                 ActualParameter actualParameter = (ActualParameter) output.get(paramName);
                 if ("URI".equals(actualParameter.getType().getType().toString())) {
                 	String downloadFile = MappingFactory.toString(actualParameter);
+                	if(downloadFile == null){
+                		throw new GFacHandlerException("Empty Output returned from the application");
+                	}
                 	pbsCluster.scpTo(outputPath, downloadFile);
                     String fileName = downloadFile.substring(downloadFile.lastIndexOf(File.separatorChar)+1,
downloadFile.length());
                     DataObjectType dataObjectType = new DataObjectType();

http://git-wip-us.apache.org/repos/asf/airavata/blob/6a11b29d/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHOutputHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHOutputHandler.java
b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHOutputHandler.java
index 37f6c5e..e7e1f4c 100644
--- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHOutputHandler.java
+++ b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHOutputHandler.java
@@ -202,9 +202,12 @@ public class SSHOutputHandler extends AbstractHandler {
                 }
             }
             if (outputArray == null || outputArray.isEmpty()) {
-                throw new GFacHandlerException(
+            	log.error("Empty Output returned from the Application, Double check the application
and ApplicationDescriptor output Parameter Names");
+            	if(jobExecutionContext.getTaskData().getAdvancedOutputDataHandling() == null){
+            		throw new GFacHandlerException(
                         "Empty Output returned from the Application, Double check the application"
                                 + "and ApplicationDescriptor output Parameter Names");
+            	}
             }
             app.setStandardError(localStdErrFile.getAbsolutePath());
             app.setStandardOutput(localStdOutFile.getAbsolutePath());


Mime
View raw message