airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shame...@apache.org
Subject [5/7] airavata git commit: Fixed NPE with resource job manager
Date Tue, 08 Nov 2016 17:57:58 GMT
Fixed NPE with resource job manager


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

Branch: refs/heads/develop
Commit: aefd913a843f1bc764aa8da49f496a06dea27c77
Parents: fe7bc1f
Author: Shameera Rathnayaka <shameerainfo@gmail.com>
Authored: Mon Nov 7 15:20:39 2016 -0500
Committer: Shameera Rathnayaka <shameerainfo@gmail.com>
Committed: Mon Nov 7 15:20:39 2016 -0500

----------------------------------------------------------------------
 .../main/java/org/apache/airavata/gfac/core/GFacUtils.java    | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/aefd913a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java
b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java
index 4de01ab..88a3ada 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/GFacUtils.java
@@ -490,7 +490,7 @@ public class GFacUtils {
         GroovyMap groovyMap = new GroovyMap();
         try {
             ProcessModel processModel = processContext.getProcessModel();
-            ResourceJobManager resourceJobManager = getResourceJobManager(processContext);
+            ResourceJobManager resourceJobManager = processContext.getResourceJobManager();
             setMailAddresses(processContext, groovyMap); // set email options and addresses
 
             groovyMap.add(Script.INPUT_DIR, processContext.getInputDir());
@@ -611,8 +611,9 @@ public class GFacUtils {
             }
 
             ApplicationParallelismType parallelism = appDepDescription.getParallelism();
-            Map<ApplicationParallelismType, String> parallelismPrefix = processContext.getResourceJobManager().getParallelismPrefix();
-            if (parallelism != null) {
+
+            if (parallelism != null && resourceJobManager != null) {
+                Map<ApplicationParallelismType, String> parallelismPrefix = resourceJobManager.getParallelismPrefix();
                 if (parallelism != ApplicationParallelismType.SERIAL) {
                     if (parallelismPrefix != null){
                         String parallelismCommand = parallelismPrefix.get(parallelism);


Mime
View raw message