You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sh...@apache.org on 2016/03/11 17:24:21 UTC
airavata git commit: remove tar file from remote resource after
successfuly removed from computer resource to storage resource
Repository: airavata
Updated Branches:
refs/heads/develop 39483e486 -> bb3331f3d
remove tar file from remote resource after successfuly removed from computer resource to storage resource
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/bb3331f3
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/bb3331f3
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/bb3331f3
Branch: refs/heads/develop
Commit: bb3331f3d2d6f6c3dcfdfd75db5d7c5560d3b2b1
Parents: 39483e4
Author: Shameera Rathnayaka <sh...@gmail.com>
Authored: Fri Mar 11 11:24:16 2016 -0500
Committer: Shameera Rathnayaka <sh...@gmail.com>
Committed: Fri Mar 11 11:24:16 2016 -0500
----------------------------------------------------------------------
.../java/org/apache/airavata/gfac/impl/task/ArchiveTask.java | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/bb3331f3/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 f6988f2..ef1708b 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
@@ -129,10 +129,13 @@ public class ArchiveTask implements Task {
path += "/" + archiveTar;
remoteCluster.execute(commandInfo);
destinationURI = getDestinationURI(taskContext, archiveTar);
-
remoteCluster.scpThirdParty(path ,destinationURI.getPath() , sshSession, RemoteCluster.DIRECTION.FROM, true);
- // untar file and delete tar
+ // delete tar in remote computer resource
+ commandInfo = new RawCommandInfo("rm " + path + "/" + archiveTar);
+ remoteCluster.execute(commandInfo);
+
+ // untar file and delete tar in storage resource
String destPath = destinationURI.getPath();
String destParent = destPath.substring(0, destPath.lastIndexOf("/"));
commandInfo = new RawCommandInfo("cd " + destParent + " && tar -xvf " + archiveTar + " && rm " + archiveTar);