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 partial jobId retrieve from PBS resource at validation step.
Date Fri, 05 Jun 2015 15:45:25 GMT
Repository: airavata
Updated Branches:
  refs/heads/airavata-0.15-release-branch 58af590d3 -> 97135ad33


Fixed partial jobId retrieve from PBS resource at validation step.


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

Branch: refs/heads/airavata-0.15-release-branch
Commit: 97135ad33c057b4f54ccf873e7a14cac8f286f56
Parents: 58af590
Author: Shameera Rathanyaka <shameerainfo@gmail.com>
Authored: Fri Jun 5 11:45:22 2015 -0400
Committer: Shameera Rathanyaka <shameerainfo@gmail.com>
Committed: Fri Jun 5 11:45:22 2015 -0400

----------------------------------------------------------------------
 .../apache/airavata/gsi/ssh/api/job/PBSJobConfiguration.java   | 2 +-
 .../org/apache/airavata/gsi/ssh/api/job/PBSOutputParser.java   | 6 +++++-
 .../apache/airavata/gsi/ssh/impl/GSISSHAbstractCluster.java    | 1 +
 3 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/97135ad3/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/PBSJobConfiguration.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/PBSJobConfiguration.java
b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/PBSJobConfiguration.java
index b658b16..7e8db3b 100644
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/PBSJobConfiguration.java
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/PBSJobConfiguration.java
@@ -99,7 +99,7 @@ public class PBSJobConfiguration implements JobManagerConfiguration {
     @Override
     public RawCommandInfo getJobIdMonitorCommand(String jobName, String userName) {
         // For PBS there is no option to get jobDetails by JobName, so we search with userName
-        return new RawCommandInfo(this.installedPath + "qstat -u " + userName);
+        return new RawCommandInfo(this.installedPath + "qstat -u " + userName + " -f  | grep
\"Job_Name = " + jobName + "\" -B1");
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/airavata/blob/97135ad3/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/PBSOutputParser.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/PBSOutputParser.java
b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/PBSOutputParser.java
index 1458f4c..81f241d 100644
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/PBSOutputParser.java
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/PBSOutputParser.java
@@ -194,8 +194,12 @@ public class PBSOutputParser implements OutputParser {
 
     @Override
     public String parseJobId(String jobName, String rawOutput) throws SSHApiException {
+        /* output will look like
+        Job Id: 2080802.gordon-fe2.local
+            Job_Name = A312402627
+         */
         String regJobId = "jobId";
-        Pattern pattern = Pattern.compile("\\s*(?<" + regJobId + ">[^\\s]*).* " + jobName
+ " "); // regex , JOB_ID will come as first column
+        Pattern pattern = Pattern.compile("(?<" + regJobId + ">[^\\s]*)\\s*.* " + jobName);
         if (rawOutput != null) {
             Matcher matcher = pattern.matcher(rawOutput);
             if (matcher.find()) {

http://git-wip-us.apache.org/repos/asf/airavata/blob/97135ad3/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 7a04f11..f8b46c8 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
@@ -630,6 +630,7 @@ public class GSISSHAbstractCluster implements Cluster {
         return files;
     }
 
+    @Deprecated
     public synchronized void getJobStatuses(String userName, Map<String,JobStatus>
jobIDs)throws SSHApiException {
         int retry = 3;
         RawCommandInfo rawCommandInfo = jobManagerConfiguration.getUserBasedMonitorCommand(userName);


Mime
View raw message