airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shame...@apache.org
Subject airavata git commit: Fixed scp direction issue
Date Tue, 27 Dec 2016 17:00:22 GMT
Repository: airavata
Updated Branches:
  refs/heads/develop 6a63e1860 -> fc8f4a500


Fixed scp direction issue


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/fc8f4a50
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/fc8f4a50
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/fc8f4a50

Branch: refs/heads/develop
Commit: fc8f4a500deb524e3911f56101f7f6eacb868405
Parents: 6a63e18
Author: Shameera Rathnayaka <shameerainfo@gmail.com>
Authored: Tue Dec 27 12:00:09 2016 -0500
Committer: Shameera Rathnayaka <shameerainfo@gmail.com>
Committed: Tue Dec 27 12:00:09 2016 -0500

----------------------------------------------------------------------
 .../java/org/apache/airavata/gfac/impl/HPCRemoteCluster.java   | 2 +-
 .../java/org/apache/airavata/gfac/impl/task/ArchiveTask.java   | 6 +++++-
 .../org/apache/airavata/gfac/impl/task/SCPDataStageTask.java   | 4 ++--
 .../org/apache/airavata/gfac/impl/task/utils/StreamData.java   | 2 +-
 4 files changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/fc8f4a50/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/HPCRemoteCluster.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/HPCRemoteCluster.java
b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/HPCRemoteCluster.java
index 89acfbc..5002a6b 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/HPCRemoteCluster.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/HPCRemoteCluster.java
@@ -173,7 +173,7 @@ public class HPCRemoteCluster extends AbstractRemoteCluster{
 				session = Factory.getSSHSession(authenticationInfo, serverInfo);
 				log.info("Transferring from:" + sourceFile + " To: " + destinationFile);
 				try {
-					if (direction == DIRECTION.TO) {
+					if (direction == DIRECTION.FROM) {
                         SSHUtils.scpThirdParty(sourceFile, session, destinationFile, clientSession,
ignoreEmptyFile);
                     } else {
                         SSHUtils.scpThirdParty(sourceFile, clientSession, destinationFile,
session, ignoreEmptyFile);

http://git-wip-us.apache.org/repos/asf/airavata/blob/fc8f4a50/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/ArchiveTask.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/ArchiveTask.java
b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/ArchiveTask.java
index d60a0ff..77cb540 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/ArchiveTask.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/ArchiveTask.java
@@ -127,7 +127,11 @@ public class ArchiveTask implements Task {
             // move tar to storage resource
             remoteCluster.execute(commandInfo);
             destinationURI = TaskUtils.getDestinationURI(taskContext, hostName, inputPath,
archiveTar);
-            remoteCluster.scpThirdParty(resourceAbsTarFilePath ,destinationURI.getPath()
, sshSession, RemoteCluster.DIRECTION.FROM, true);
+            remoteCluster.scpThirdParty(resourceAbsTarFilePath ,
+                    destinationURI.getPath() ,
+                    sshSession,
+                    RemoteCluster.DIRECTION.FROM,
+                    true);
 
             // delete tar in remote computer resource
             commandInfo = new RawCommandInfo("rm " + resourceAbsTarFilePath);

http://git-wip-us.apache.org/repos/asf/airavata/blob/fc8f4a50/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/SCPDataStageTask.java
----------------------------------------------------------------------
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 8ab8ae2..919d0be 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
@@ -246,7 +246,7 @@ public class SCPDataStageTask implements Task {
          * scp third party file transfer 'to' compute resource.
          */
         taskContext.getParentProcessContext().getDataMovementRemoteCluster().scpThirdParty(sourceURI.getPath(),
-                destinationURI.getPath(), sshSession, RemoteCluster.DIRECTION.TO, false);
+                destinationURI.getPath(), sshSession, RemoteCluster.DIRECTION.FROM, false);
     }
 
     private void outputDataStaging(TaskContext taskContext, Session sshSession, URI sourceURI,
URI destinationURI)
@@ -256,7 +256,7 @@ public class SCPDataStageTask implements Task {
          * scp third party file transfer 'from' comute resource.
          */
         taskContext.getParentProcessContext().getDataMovementRemoteCluster().scpThirdParty(sourceURI.getPath(),
-                destinationURI.getPath(), sshSession, RemoteCluster.DIRECTION.FROM, true);
+                destinationURI.getPath(), sshSession, RemoteCluster.DIRECTION.TO, true);
         // update output locations
         GFacUtils.saveExperimentOutput(taskContext.getParentProcessContext(), taskContext.getProcessOutput().getName(),
destinationURI.toString());
         GFacUtils.saveProcessOutput(taskContext.getParentProcessContext(), taskContext.getProcessOutput().getName(),
destinationURI.toString());

http://git-wip-us.apache.org/repos/asf/airavata/blob/fc8f4a50/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/utils/StreamData.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/utils/StreamData.java
b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/utils/StreamData.java
index aaf3058..1fca011 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/utils/StreamData.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/utils/StreamData.java
@@ -155,7 +155,7 @@ public class StreamData extends TimerTask  {
          * scp third party file transfer 'from' comute resource.
          */
         taskContext.getParentProcessContext().getDataMovementRemoteCluster().scpThirdParty(sourceURI.getPath(),
-                destinationURI.getPath(), sshSession, RemoteCluster.DIRECTION.FROM, true);
+                destinationURI.getPath(), sshSession, RemoteCluster.DIRECTION.TO, true);
         // update output locations
         GFacUtils.saveExperimentOutput(taskContext.getParentProcessContext(), taskContext.getProcessOutput().getName(),
destinationURI.getPath());
         GFacUtils.saveProcessOutput(taskContext.getParentProcessContext(), taskContext.getProcessOutput().getName(),
destinationURI.getPath());


Mime
View raw message