airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lah...@apache.org
Subject git commit: fixing more monitoring issues
Date Thu, 02 Oct 2014 21:24:52 GMT
Repository: airavata
Updated Branches:
  refs/heads/master 9258b9019 -> a256f3516


fixing more monitoring issues


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

Branch: refs/heads/master
Commit: a256f3516536920c97e26676e2fcc45213bfa2b2
Parents: 9258b90
Author: lahiru <lahiru@apache.org>
Authored: Thu Oct 2 17:24:47 2014 -0400
Committer: lahiru <lahiru@apache.org>
Committed: Thu Oct 2 17:24:47 2014 -0400

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


http://git-wip-us.apache.org/repos/asf/airavata/blob/a256f351/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 c027608..e066669 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
@@ -194,14 +194,14 @@ public class HPCPullMonitor extends PullMonitor {
                                 logger.info("ExperimentID: " + cancelMId.split("\\+")[0]
+ ",TaskID: " + cancelMId.split("\\+")[1] + "JobID" + iMonitorID.getJobID());
                                 iMonitorID.setStatus(JobState.CANCELED);
                                 completedJobs.put(iMonitorID.getJobName(), iMonitorID);
-                                cancelJobList.remove(cancelMId);
+                                iterator1.remove();
                                 break;
                             }
                         }
                         iterator1 = cancelJobList.iterator();
                     }
                     synchronized (completedJobsFromPush) {
-                        Iterator<String> iterator = completedJobsFromPush.iterator();
+                        ListIterator<String> iterator = completedJobsFromPush.listIterator();
                         for (MonitorID iMonitorID : monitorID) {
                             String completeId = null;
                             while (iterator.hasNext()) {
@@ -210,8 +210,7 @@ public class HPCPullMonitor extends PullMonitor {
                                     logger.info("This job is finished because push notification
came with <username,jobName> " + completeId);
                                     completedJobs.put(iMonitorID.getJobName(), iMonitorID);
                                     iMonitorID.setStatus(JobState.COMPLETE);
-                                    completedJobsFromPush.remove(completeId);//we have to
make this empty everytime we iterate, otherwise this list will accumulate and will
-                                    // lead to a memory leak
+                                    iterator.remove();//we have to make this empty everytime
we iterate, otherwise this list will accumulate and will lead to a memory leak
                                     break;
                                 }
                             }

http://git-wip-us.apache.org/repos/asf/airavata/blob/a256f351/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 1d6c8af..4f13cf5 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
@@ -312,7 +312,6 @@ public class GSISSHAbstractCluster implements Cluster {
                         e1.printStackTrace();
                     }
                     reconnect(serverInfo, authenticationInfo);
-                    reconnect(serverInfo,authenticationInfo);
                     if(retry==0) {
                         throw e;
                     }
@@ -399,7 +398,6 @@ public class GSISSHAbstractCluster implements Cluster {
                     e1.printStackTrace();
                 }
                 reconnect(serverInfo, authenticationInfo);
-                reconnect(serverInfo, authenticationInfo);
                 if (retry == 0) {
                     throw new SSHApiException("Failed during scping local file:" + localFile
+ " to remote file "
                             + serverInfo.getHost() + ":rFile", e);
@@ -603,8 +601,7 @@ public class GSISSHAbstractCluster implements Cluster {
         String stdErrorString = jobIDReaderCommandOutput.getStdErrorString();
         log.info("StandardOutput Returned:" + stdOutputString);
         log.info("StandardError  Returned:" +stdErrorString);
-        
-        // We are checking for stderr containing the command issued. Thus ignores the verbose
logs in stderr.  
+        // We are checking for stderr containing the command issued. Thus ignores the verbose
logs in stderr.
         if (stdErrorString != null && stdErrorString.contains(command)) {
             log.error("Standard Error output : " + stdErrorString);
             throw new SSHApiException(errorMsg + "\n\r StandardOutput: "+ stdOutputString
+ "\n\r StandardError: "+ stdErrorString);


Mime
View raw message