airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shame...@apache.org
Subject [1/2] git commit: Fixed gfac instance list init issue when call Orchestrator with initial GFac instants list
Date Sat, 06 Sep 2014 13:54:07 GMT
Repository: airavata
Updated Branches:
  refs/heads/master 0231873b3 -> 93e37db8b


Fixed gfac instance list init issue when call Orchestrator with initial GFac instants list


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

Branch: refs/heads/master
Commit: 36e93a6d923a3a6c27e2a3f2967359c014d1772f
Parents: 360a5be
Author: shamrath <shameerainfo@gmail.com>
Authored: Fri Sep 5 12:06:02 2014 -0400
Committer: shamrath <shameerainfo@gmail.com>
Committed: Fri Sep 5 12:06:02 2014 -0400

----------------------------------------------------------------------
 .../orchestrator/core/context/OrchestratorContext.java    | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/36e93a6d/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/context/OrchestratorContext.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/context/OrchestratorContext.java
b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/context/OrchestratorContext.java
index 605b0a2..7cd212a 100644
--- a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/context/OrchestratorContext.java
+++ b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/context/OrchestratorContext.java
@@ -25,6 +25,7 @@ import java.util.List;
 
 import org.apache.airavata.orchestrator.core.OrchestratorConfiguration;
 import org.apache.airavata.orchestrator.core.gfac.GFACInstance;
+import org.apache.airavata.orchestrator.cpi.Orchestrator;
 import org.apache.airavata.registry.cpi.Registry;
 import org.apache.zookeeper.ZooKeeper;
 
@@ -41,10 +42,15 @@ public class OrchestratorContext {
     private ZooKeeper zk;
     
     public OrchestratorContext(List<GFACInstance> gfacInstanceList) {
-        this.gfacInstanceList = new ArrayList<GFACInstance>();
+        if (gfacInstanceList != null) {
+            this.gfacInstanceList = gfacInstanceList;
+        }else {
+            this.gfacInstanceList = new ArrayList<GFACInstance>();
+        }
     }
 
     public OrchestratorContext() {
+        this(null);
     }
 
     public List<GFACInstance> getGfacInstanceList() {
@@ -72,7 +78,7 @@ public class OrchestratorContext {
     }
 
     public void setGfacInstanceList(List<GFACInstance> gfacInstanceList) {
-        this.gfacInstanceList = gfacInstanceList;
+        this.gfacInstanceList.addAll(gfacInstanceList);
     }
 
     public void setZk(ZooKeeper zk) {


Mime
View raw message