airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ramin...@apache.org
Subject [1/2] git commit: Fixed RabbitMQ calling for SGE. AIRAVATA-1451
Date Wed, 24 Sep 2014 16:26:14 GMT
Repository: airavata
Updated Branches:
  refs/heads/master cc0f8eceb -> d6e8b19d4


Fixed RabbitMQ calling for SGE. AIRAVATA-1451

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

Branch: refs/heads/master
Commit: dac39e04d608f44c8cd56ac7e01fc51478a04e24
Parents: 6a11b29
Author: raminder <raminder@apache.org>
Authored: Wed Sep 24 12:20:54 2014 -0400
Committer: raminder <raminder@apache.org>
Committed: Wed Sep 24 12:20:54 2014 -0400

----------------------------------------------------------------------
 .../server/src/main/resources/SGETemplate.xslt      |  2 +-
 .../airavata/gsi/ssh/api/job/SGEOutputParser.java   | 16 ++++++++++------
 .../org/apache/airavata/gsi/ssh/impl/JobStatus.java |  4 +++-
 3 files changed, 14 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/dac39e04/modules/configuration/server/src/main/resources/SGETemplate.xslt
----------------------------------------------------------------------
diff --git a/modules/configuration/server/src/main/resources/SGETemplate.xslt b/modules/configuration/server/src/main/resources/SGETemplate.xslt
index 3b8557c..bcf8948 100644
--- a/modules/configuration/server/src/main/resources/SGETemplate.xslt
+++ b/modules/configuration/server/src/main/resources/SGETemplate.xslt
@@ -73,7 +73,7 @@ cd <xsl:text>   </xsl:text><xsl:value-of select="ns:workingDirectory"/><xsl:text
 <xsl:for-each select="ns:postJobCommands/ns:command">
       <xsl:value-of select="."/><xsl:text>   </xsl:text>
 </xsl:for-each>
-
+~/rabbitmq-java-client-bin-3.3.5/runjava.sh com.rabbitmq.examples.SimpleProducer amqp://<xsl:value-of
select="ns:callBackIp"/><xsl:text> </xsl:text><xsl:value-of select="ns:userName"/>,<xsl:value-of
select="ns:jobName"/>
 </xsl:template>
 
 </xsl:stylesheet>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/dac39e04/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/SGEOutputParser.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/SGEOutputParser.java
b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/SGEOutputParser.java
index ab60bb3..bcef43b 100644
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/SGEOutputParser.java
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/api/job/SGEOutputParser.java
@@ -117,12 +117,16 @@ public class SGEOutputParser implements OutputParser{
         }
     }
 
-    public String parse(String rawOutput) {
-        log.debug(rawOutput);
-        String[] info = rawOutput.split("\n");
-        String lastLine = info[info.length - 1];
-        return lastLine.split(" ")[2];  //In PBS stdout is going to be directly the jobID
-    }
+	public String parse(String rawOutput) {
+		log.debug(rawOutput);
+		if (rawOutput != null && !rawOutput.isEmpty()) {
+			String[] info = rawOutput.split("\n");
+			String lastLine = info[info.length - 1];
+			return lastLine.split(" ")[2]; // In PBS stdout is going to be directly the jobID
+		} else {
+			return "";
+		}
+	}
 
     public JobStatus parse(String jobID, String rawOutput) {
        // not implemented to sun grid engine

http://git-wip-us.apache.org/repos/asf/airavata/blob/dac39e04/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/JobStatus.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/JobStatus.java b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/JobStatus.java
index a87a01a..044ac13 100644
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/JobStatus.java
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/JobStatus.java
@@ -35,7 +35,7 @@
   * S -  (Unicos only) job is suspend.
   */
  public enum JobStatus {
-     C, E, H, Q, R, T, W, S,U,F,CA,CD,CF,CG,NF,PD,PR,TO,qw,t,r,h,Er;
+     C, E, H, Q, R, T, W, S,U,F,CA,CD,CF,CG,NF,PD,PR,TO,qw,t,r,h,Er,Eqw;
 
      public static JobStatus fromString(String status){
         if(status != null){
@@ -87,6 +87,8 @@
                 return JobStatus.h;
             }else if("Er".equals(status)){
                 return JobStatus.Er;
+            }else if("Eqw".equals(status)){
+                return JobStatus.Er;
             }
         }
          return JobStatus.U;


Mime
View raw message