airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lah...@apache.org
Subject git commit: fixing monitoring related issues with start monitoring with jobName rather using jobID
Date Sat, 26 Jul 2014 11:10:45 GMT
Repository: airavata
Updated Branches:
  refs/heads/master e61a290d4 -> d9f4dc0ef


fixing monitoring related issues with start monitoring with jobName rather using jobID


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

Branch: refs/heads/master
Commit: d9f4dc0efd82f9b956c2bc9f6e355453df72f420
Parents: e61a290
Author: lahiru <lahiru@apache.org>
Authored: Sat Jul 26 07:09:51 2014 -0400
Committer: lahiru <lahiru@apache.org>
Committed: Sat Jul 26 07:09:51 2014 -0400

----------------------------------------------------------------------
 .../configuration/server/src/main/resources/PBSTemplate.xslt    | 5 +++++
 .../airavata/gfac/gsissh/provider/impl/GSISSHProvider.java      | 1 +
 .../org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java   | 2 +-
 .../java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java    | 2 +-
 .../org/apache/airavata/gsi/ssh/api/job/PBSOutputParser.java    | 4 +++-
 .../org/apache/airavata/gsi/ssh/api/job/SlurmOutputParser.java  | 2 +-
 6 files changed, 12 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/d9f4dc0e/modules/configuration/server/src/main/resources/PBSTemplate.xslt
----------------------------------------------------------------------
diff --git a/modules/configuration/server/src/main/resources/PBSTemplate.xslt b/modules/configuration/server/src/main/resources/PBSTemplate.xslt
index cf8dfb6..a221ce2 100644
--- a/modules/configuration/server/src/main/resources/PBSTemplate.xslt
+++ b/modules/configuration/server/src/main/resources/PBSTemplate.xslt
@@ -20,6 +20,11 @@
     </xsl:when>
     </xsl:choose>
     <xsl:choose>
+        <xsl:when test="ns:jobName">
+#PBS -N <xsl:value-of select="ns:jobName"/>
+        </xsl:when>
+    </xsl:choose>
+    <xsl:choose>
     <xsl:when test="ns:mailOptions">
 #PBS -m <xsl:value-of select="ns:mailOptions"/>
     </xsl:when>

http://git-wip-us.apache.org/repos/asf/airavata/blob/d9f4dc0e/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/provider/impl/GSISSHProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/provider/impl/GSISSHProvider.java
b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/provider/impl/GSISSHProvider.java
index 9ea284b..8d311bc 100644
--- a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/provider/impl/GSISSHProvider.java
+++ b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/provider/impl/GSISSHProvider.java
@@ -94,6 +94,7 @@ public class GSISSHProvider extends AbstractRecoverableProvider {
 
             String jobID = cluster.submitBatchJob(jobDescriptor);
             jobExecutionContext.setJobDetails(jobDetails);
+            jobID = null; // todo should remove this line
             if (jobID == null) {
                 jobDetails.setJobID("none");
                 GFacUtils.saveJobStatus(jobExecutionContext, jobDetails, JobState.FAILED);

http://git-wip-us.apache.org/repos/asf/airavata/blob/d9f4dc0e/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
index 6ce84d2..4c93024 100644
--- a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
+++ b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/util/GFACGSISSHUtils.java
@@ -112,7 +112,7 @@ public class GFACGSISSHUtils {
         jobDescriptor.setStandardOutFile(app.getStandardOutput());
         jobDescriptor.setStandardErrorFile(app.getStandardError());
         Random random = new Random();
-        int i = random.nextInt();
+        int i = random.nextInt(Integer.MAX_VALUE); // We always set the job name
         jobDescriptor.setJobName(String.valueOf(i));
         jobDescriptor.setWorkingDirectory(app.getStaticWorkingDirectory());
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d9f4dc0e/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
index 4776de7..f0f5c50 100644
--- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
+++ b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java
@@ -100,7 +100,7 @@ public class GFACSSHUtils {
         jobDescriptor.setStandardOutFile(app.getStandardOutput());
         jobDescriptor.setStandardErrorFile(app.getStandardError());
         Random random = new Random();
-        int i = random.nextInt();
+        int i = random.nextInt(Integer.MAX_VALUE);
         jobDescriptor.setJobName(String.valueOf(i));
         jobDescriptor.setWorkingDirectory(app.getStaticWorkingDirectory());
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/d9f4dc0e/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 23c0122..a5c735a 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
@@ -161,8 +161,10 @@ public class PBSOutputParser implements OutputParser {
         String[]    info = rawOutput.split("\n");
         int lastStop = 0;
         for (String jobID : statusMap.keySet()) {
+            String jobId = jobID.split(",")[0];
+            String jobName = jobID.split(",")[1];
             for (int i = lastStop; i < info.length; i++) {
-                if (jobID.split(",")[0].contains(info[i].split(" ")[0]) && !"".equals(info[i].split("
")[0])) {
+                if (info[i].contains(jobName.substring(0,8))) {
                     // now starts processing this line
                     log.info(info[i]);
                     String correctLine = info[i];

http://git-wip-us.apache.org/repos/asf/airavata/blob/d9f4dc0e/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/SlurmOutputParser.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/SlurmOutputParser.java
b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/SlurmOutputParser.java
index 717caae..2fbbd0e 100644
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/SlurmOutputParser.java
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/SlurmOutputParser.java
@@ -161,7 +161,7 @@ public class SlurmOutputParser implements OutputParser {
             String jobId = jobID.split(",")[0];
             String jobName = jobID.split(",")[1];
             for (int i = lastStop; i < info.length; i++) {
-                if (info[i].contains(jobId) || info[i].contains(jobName.substring(0,8)))
{
+                if (info[i].contains(jobName.substring(0,8))) {
                     // now starts processing this line
                     log.info(info[i]);
                     String correctLine = info[i];


Mime
View raw message