This is an automated email from the ASF dual-hosted git repository.

dimuthuupe pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata.git


The following commit(s) were added to refs/heads/develop by this push:
     new 4836bdf  Fixing the bug in wildcard supporting of OutputDataStaging 
Task
4836bdf is described below

commit 4836bdf62ba2d6710b5998671519dc09e1bff312
Author: dimuthu <dimuthu.upeks...@gmail.com>
AuthorDate: Fri Apr 13 10:33:34 2018 -0400

    Fixing the bug in wildcard supporting of OutputDataStaging Task
---
 .../helix/impl/task/staging/OutputDataStagingTask.java         | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git 
a/modules/airavata-helix/helix-spectator/src/main/java/org/apache/airavata/helix/impl/task/staging/OutputDataStagingTask.java
 
b/modules/airavata-helix/helix-spectator/src/main/java/org/apache/airavata/helix/impl/task/staging/OutputDataStagingTask.java
index 2c2d201..200a073 100644
--- 
a/modules/airavata-helix/helix-spectator/src/main/java/org/apache/airavata/helix/impl/task/staging/OutputDataStagingTask.java
+++ 
b/modules/airavata-helix/helix-spectator/src/main/java/org/apache/airavata/helix/impl/task/staging/OutputDataStagingTask.java
@@ -128,8 +128,11 @@ public class OutputDataStagingTask extends DataStagingTask 
{
                 }
 
                 for (String temp : fileNames) {
-                    if (temp != null && !temp.equals("")) {
+                    if (!"".equals(temp)) {
                         sourceFileName = temp;
+                    } else {
+                        logger.warn("Ignoring file transfer as filename is 
empty or null");
+                        continue;
                     }
                     if (destParentPath.endsWith(File.separator)) {
                         destinationURI = new URI(destParentPath + 
sourceFileName);
@@ -137,6 +140,9 @@ public class OutputDataStagingTask extends DataStagingTask {
                         destinationURI = new URI(destParentPath + 
File.separator + sourceFileName);
                     }
 
+                    URI newSourceURI = new 
URI((sourceParentPath.endsWith(File.separator) ?
+                            sourceParentPath : sourceParentPath + 
File.separator) + sourceFileName);
+
                     //Wildcard support is only enabled for output data staging
                     assert processOutput != null;
                     processOutput.setName(sourceFileName);
@@ -151,7 +157,7 @@ public class OutputDataStagingTask extends DataStagingTask {
                     }
 
                     logger.info("Transferring file " + sourceFileName);
-                    boolean transferred = 
transferFileToStorage(sourceURI.getPath(), destinationURI.getPath(), 
sourceFileName, adaptor, storageResourceAdaptor);
+                    boolean transferred = 
transferFileToStorage(newSourceURI.getPath(), destinationURI.getPath(), 
sourceFileName, adaptor, storageResourceAdaptor);
                     if (transferred) {
                         saveExperimentOutput(processOutput.getName(), 
destinationURI.toString());
                     } else {

-- 
To stop receiving notification emails like this one, please contact
dimuthu...@apache.org.

Reply via email to