You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by la...@apache.org on 2013/03/19 16:30:19 UTC

svn commit: r1458334 - /airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/EmbeddedGFacInvoker.java

Author: lahiru
Date: Tue Mar 19 15:30:19 2013
New Revision: 1458334

URL: http://svn.apache.org/r1458334
Log:
use workflowcontext header host and give higher preference for that.

Modified:
    airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/EmbeddedGFacInvoker.java

Modified: airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/EmbeddedGFacInvoker.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/EmbeddedGFacInvoker.java?rev=1458334&r1=1458333&r2=1458334&view=diff
==============================================================================
--- airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/EmbeddedGFacInvoker.java (original)
+++ airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/EmbeddedGFacInvoker.java Tue Mar 19 15:30:19 2013
@@ -279,10 +279,14 @@ public class EmbeddedGFacInvoker impleme
      */
     public synchronized boolean invoke() throws WorkflowException {
         try {
-
+            String hostName = this.configuration.getContextHeader().getSoaServiceEprs().getHostDescriptor();
             //todo This is the basic scheduling, have to do proper scheduling implementation
             ServiceDescription serviceDescription = airavataAPI.getApplicationManager().getServiceDescription(serviceName);
             HostDescription registeredHost = getRegisteredHost(airavataAPI, this.serviceName);
+            // if user specify a host, no matter what we pick that host for all the nodes, todo: allow users to specifi node specific host
+            if(hostName != null || hostName.isEmpty()) {
+                registeredHost = airavataAPI.getApplicationManager().getHostDescription(hostName);
+            }
             ApplicationDescription applicationDescription = airavataAPI.getApplicationManager().getApplicationDescription(serviceName, registeredHost.getType().getHostName());
 
             // When we run getInParameters we set the actualParameter object, this has to be fixed
@@ -300,6 +304,7 @@ public class EmbeddedGFacInvoker impleme
 
             jobExecutionContext.setContextHeader(WorkflowContextHeaderBuilder.removeOtherSchedulingConfig(nodeID,configuration.getContextHeader()));
 
+
             jobExecutionContext.setProperty(Constants.PROP_WORKFLOW_NODE_ID,this.nodeID);
             jobExecutionContext.setProperty(Constants.PROP_TOPIC,this.configuration.getTopic());
             jobExecutionContext.setProperty(Constants.PROP_BROKER_URL,this.configuration.getBrokerURL().toASCIIString());