You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by di...@apache.org on 2018/04/05 20:02:56 UTC
[airavata] branch develop updated: Checking the existence of output
file before transferring
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 e45108a Checking the existence of output file before transferring
e45108a is described below
commit e45108a00b3542907fc5494a2a4ef288a1fa9e3b
Author: dimuthu <di...@gmail.com>
AuthorDate: Thu Apr 5 16:02:50 2018 -0400
Checking the existence of output file before transferring
---
.../airavata/helix/impl/task/staging/DataStagingTask.java | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/modules/airavata-helix/helix-spectator/src/main/java/org/apache/airavata/helix/impl/task/staging/DataStagingTask.java b/modules/airavata-helix/helix-spectator/src/main/java/org/apache/airavata/helix/impl/task/staging/DataStagingTask.java
index e8c70e5..eaf9264 100644
--- a/modules/airavata-helix/helix-spectator/src/main/java/org/apache/airavata/helix/impl/task/staging/DataStagingTask.java
+++ b/modules/airavata-helix/helix-spectator/src/main/java/org/apache/airavata/helix/impl/task/staging/DataStagingTask.java
@@ -136,6 +136,18 @@ public abstract class DataStagingTask extends AiravataTask {
protected boolean transferFileToStorage(String sourcePath, String destPath, String fileName, AgentAdaptor adaptor,
StorageResourceAdaptor storageResourceAdaptor) throws TaskOnFailException {
+
+ try {
+ boolean fileExists = adaptor.doesFileExist(sourcePath);
+ if (!fileExists) {
+ logger.warn("Ignoring the file " + sourcePath + " transfer as it is not available");
+ return false;
+ }
+ } catch (AgentException e) {
+ logger.error("Error while checking the file " + sourcePath + " existence");
+ throw new TaskOnFailException("Error while checking the file " + sourcePath + " existence", true, e);
+ }
+
String localSourceFilePath = getLocalDataPath(fileName);
try {
--
To stop receiving notification emails like this one, please contact
dimuthuupe@apache.org.