You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2019/12/10 17:57:54 UTC
[airavata] branch airavata-3268 updated: AIRAVATA-3268 Use
overrideFilename on command line
This is an automated email from the ASF dual-hosted git repository.
machristie 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 5209ef3 AIRAVATA-3268 Use overrideFilename on command line
5209ef3 is described below
commit 5209ef37648cac1259b700ff529b65479baad6ba
Author: Marcus Christie <ma...@iu.edu>
AuthorDate: Tue Dec 10 12:57:33 2019 -0500
AIRAVATA-3268 Use overrideFilename on command line
---
.../helix/impl/task/submission/config/GroovyMapBuilder.java | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/modules/airavata-helix/helix-spectator/src/main/java/org/apache/airavata/helix/impl/task/submission/config/GroovyMapBuilder.java b/modules/airavata-helix/helix-spectator/src/main/java/org/apache/airavata/helix/impl/task/submission/config/GroovyMapBuilder.java
index 0944b86..110ec63 100644
--- a/modules/airavata-helix/helix-spectator/src/main/java/org/apache/airavata/helix/impl/task/submission/config/GroovyMapBuilder.java
+++ b/modules/airavata-helix/helix-spectator/src/main/java/org/apache/airavata/helix/impl/task/submission/config/GroovyMapBuilder.java
@@ -259,10 +259,14 @@ public class GroovyMapBuilder {
if (inputDataObjectType.getValue() != null
&& !inputDataObjectType.getValue().equals("")) {
if (inputDataObjectType.getType() == DataType.URI) {
- // set only the relative path
- String filePath = inputDataObjectType.getValue();
- filePath = filePath.substring(filePath.lastIndexOf(File.separatorChar) + 1, filePath.length());
- inputValues.add(filePath);
+ if (inputDataObjectType.getOverrideFilename() != null) {
+ inputValues.add(inputDataObjectType.getOverrideFilename());
+ } else {
+ // set only the relative path
+ String filePath = inputDataObjectType.getValue();
+ filePath = filePath.substring(filePath.lastIndexOf(File.separatorChar) + 1, filePath.length());
+ inputValues.add(filePath);
+ }
} else if (inputDataObjectType.getType() == DataType.URI_COLLECTION) {
String filePaths = inputDataObjectType.getValue();
String[] paths = filePaths.split(MULTIPLE_INPUTS_SPLITTER);