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 2019/12/05 20:04:18 UTC

[airavata] branch airavata-3268 updated: Attaching overrideFileName to destination

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

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


The following commit(s) were added to refs/heads/airavata-3268 by this push:
     new 3cb9347  Attaching overrideFileName to destination
3cb9347 is described below

commit 3cb9347a10ad266613d80910aa16a06b3d28ebcc
Author: Dimuthu Wannipurage <di...@gmail.com>
AuthorDate: Thu Dec 5 15:04:00 2019 -0500

    Attaching overrideFileName to destination
---
 .../airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java       | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java
index bd247c8..8abf107 100644
--- a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java
+++ b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java
@@ -627,11 +627,14 @@ public class SimpleOrchestratorImpl extends AbstractOrchestrator{
             DataMovementProtocol dataMovementProtocol =
                     OrchestratorUtils.getPreferredDataMovementProtocol(processModel, gatewayId);
             String loginUserName = OrchestratorUtils.getLoginUserName(processModel, gatewayId);
+            StringBuilder destinationPath = new StringBuilder(workingDir);
+            Optional.ofNullable(processInput.getOverrideFilename()).ifPresent(destinationPath::append); //If an override filename is provided
+
             destination = new URI(dataMovementProtocol.name(),
                     loginUserName,
                     computeResource.getHostName(),
                     OrchestratorUtils.getDataMovementPort(processModel, gatewayId),
-                    workingDir , null, null);
+                    destinationPath.toString(), null, null);
         } catch (URISyntaxException e) {
             throw new OrchestratorException("Error while constructing destination file URI", e);
         }