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 2017/12/12 21:45:58 UTC
[airavata] branch master updated: Remove local state from
SCPDataStageTask
This is an automated email from the ASF dual-hosted git repository.
machristie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata.git
The following commit(s) were added to refs/heads/master by this push:
new b5d2d37 Remove local state from SCPDataStageTask
b5d2d37 is described below
commit b5d2d37f959aa253f23353c25b02fa8bc09e8571
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Tue Dec 12 16:45:14 2017 -0500
Remove local state from SCPDataStageTask
SCPDataStageTask is a singleton used by multiple GFac threads so it
shouldn't have any local state.
---
.../java/org/apache/airavata/gfac/impl/task/SCPDataStageTask.java | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/SCPDataStageTask.java b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/SCPDataStageTask.java
index db94e89..fe0eb3b 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/SCPDataStageTask.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/SCPDataStageTask.java
@@ -67,8 +67,6 @@ import java.util.Map;
public class SCPDataStageTask implements Task {
private static final Logger log = LoggerFactory.getLogger(SCPDataStageTask.class);
private static final int DEFAULT_SSH_PORT = 22;
- private String hostName;
- private String inputPath;
@Override
public void init(Map<String, String> propertyMap) throws TaskException {
@@ -124,12 +122,13 @@ public class SCPDataStageTask implements Task {
StorageResourceDescription storageResource = processContext.getStorageResource();
// StoragePreference storagePreference = taskContext.getParentProcessContext().getStoragePreference();
+ String hostName = null;
if (storageResource != null) {
hostName = storageResource.getHostName();
} else {
throw new GFacException("Storage Resource is null");
}
- inputPath = processContext.getStorageFileSystemRootLocation();
+ String inputPath = processContext.getStorageFileSystemRootLocation();
inputPath = (inputPath.endsWith(File.separator) ? inputPath : inputPath + File.separator);
// use rsync instead of scp if source and destination host and user name is same.
--
To stop receiving notification emails like this one, please contact
['"commits@airavata.apache.org" <co...@airavata.apache.org>'].