airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lah...@apache.org
Subject git commit: fixing issue with file exist operation in monitoring
Date Thu, 02 Oct 2014 18:02:37 GMT
Repository: airavata
Updated Branches:
  refs/heads/master 2bbeb7a99 -> 3cca77d0a


fixing issue with file exist operation in monitoring


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

Branch: refs/heads/master
Commit: 3cca77d0a5913c98b316c967878a6246783224b7
Parents: 2bbeb7a
Author: lahiru <lahiru@apache.org>
Authored: Thu Oct 2 14:02:29 2014 -0400
Committer: lahiru <lahiru@apache.org>
Committed: Thu Oct 2 14:02:29 2014 -0400

----------------------------------------------------------------------
 .../gfac/monitor/impl/pull/qstat/HPCPullMonitor.java        | 9 +++++----
 .../apache/airavata/gsi/ssh/impl/GSISSHAbstractCluster.java | 8 +++-----
 2 files changed, 8 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/3cca77d0/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
b/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
index 5a14ac2..668812a 100644
--- a/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
+++ b/modules/gfac/gfac-monitor/src/main/java/org/apache/airavata/gfac/monitor/impl/pull/qstat/HPCPullMonitor.java
@@ -244,10 +244,11 @@ public class HPCPullMonitor extends PullMonitor {
                                     " 3 times, so skip this Job from Monitor");
                             iMonitorID.setLastMonitored(new Timestamp((new Date()).getTime()));
                             JobDescriptor jobDescriptor = JobDescriptor.fromXML(iMonitorID.getJobExecutionContext().getJobDetails().getJobDescription());
-                            List<String> stdErr = connection.getCluster().listDirectory(jobDescriptor.getStandardErrorFile());
-                            List<String> stdOut = connection.getCluster().listDirectory(jobDescriptor.getStandardOutFile());
-                            if (stdErr.size() > 0 && stdOut.size() > 0) {
-                                completedJobs.put(iMonitorID.getJobName(), iMonitorID);
+                            List<String> stdOut = connection.getCluster().listDirectory(jobDescriptor.getOutputDirectory());
+                            if (stdOut.size() > 0) {
+                                if(stdOut.contains(jobDescriptor.getStandardErrorFile())&&stdOut.contains(jobDescriptor.getStandardOutFile()))
{
+                                    completedJobs.put(iMonitorID.getJobName(), iMonitorID);
+                                }
                             }
                             } else {
                             // Evey

http://git-wip-us.apache.org/repos/asf/airavata/blob/3cca77d0/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/GSISSHAbstractCluster.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/GSISSHAbstractCluster.java
b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/GSISSHAbstractCluster.java
index 2a82cfb..1d6c8af 100644
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/GSISSHAbstractCluster.java
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/GSISSHAbstractCluster.java
@@ -523,15 +523,13 @@ public class GSISSHAbstractCluster implements Cluster {
                 }
                 reconnect(serverInfo, authenticationInfo);
                 if (retry == 0) {
-                    throw new SSHApiException("Failed during creating directory:" + directoryPath
+ " to remote file "
-                            + serverInfo.getHost() + ":rFile", e);
+                    throw new SSHApiException("Failed during listing directory:" + directoryPath
+ " to remote file ", e);
                 }
             } catch (JSchException e) {
                 retry--;
                 reconnect(serverInfo, authenticationInfo);
                 if (retry == 0) {
-                    throw new SSHApiException("Failed during creating directory :" + directoryPath
+ " to remote file "
-                            + serverInfo.getHost() + ":rFile", e);
+                    throw new SSHApiException("Failed during listing directory :" + directoryPath
+ " to remote file ", e);
                 }
             }catch (SSHApiException e) {
                 retry--;
@@ -542,7 +540,7 @@ public class GSISSHAbstractCluster implements Cluster {
                 }
                 reconnect(serverInfo, authenticationInfo);
                 if (retry == 0) {
-                    throw new SSHApiException("Failed during creating directory :" + directoryPath
+ " to remote file "
+                    throw new SSHApiException("Failed during listing directory :" + directoryPath
+ " to remote file "
                             + serverInfo.getHost() + ":rFile", e);
                 }
             }


Mime
View raw message