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 2014/01/09 21:31:45 UTC

svn commit: r1556943 - in /airavata/trunk/modules: commons/utils/src/main/java/org/apache/airavata/common/utils/ orchestrator/orchestrator-core/ orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/ orchestrator/orchestrat...

Author: lahiru
Date: Thu Jan  9 20:31:45 2014
New Revision: 1556943

URL: http://svn.apache.org/r1556943
Log:
adding embedded gfac submitter, fixing https://issues.apache.org/jira/browse/AIRAVATA-984.

Added:
    airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/EmbeddedGFACJobSubmitter.java
      - copied, changed from r1556871, airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/SimpleJobSubmitter.java
    airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/JobRequest.java
Removed:
    airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/JobRequest.java
    airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/SimpleJobSubmitter.java
Modified:
    airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/AiravataJobState.java
    airavata/trunk/modules/orchestrator/orchestrator-core/pom.xml
    airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/Orchestrator.java
    airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/OrchestratorConfiguration.java
    airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/PullBasedOrchestrator.java
    airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/utils/OrchestratorUtils.java
    airavata/trunk/modules/orchestrator/orchestrator-core/src/main/resources/orchestrator.properties
    airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/AiravataJPARegistry.java
    airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/OrchestratorRegistry.java
    airavata/trunk/modules/rest/client/src/main/java/org/apache/airavata/rest/client/RegistryClient.java

Modified: airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/AiravataJobState.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/AiravataJobState.java?rev=1556943&r1=1556942&r2=1556943&view=diff
==============================================================================
--- airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/AiravataJobState.java (original)
+++ airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/AiravataJobState.java Thu Jan  9 20:31:45 2014
@@ -26,6 +26,11 @@ gfac instances
  */
 public class AiravataJobState {
     public enum State {
+        CREATED {
+            public String toString() {
+                return "CREATED";
+            }
+        },
         ACCEPTED {
             public String toString() {
                 return "ACCEPTED";

Modified: airavata/trunk/modules/orchestrator/orchestrator-core/pom.xml
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/orchestrator/orchestrator-core/pom.xml?rev=1556943&r1=1556942&r2=1556943&view=diff
==============================================================================
--- airavata/trunk/modules/orchestrator/orchestrator-core/pom.xml (original)
+++ airavata/trunk/modules/orchestrator/orchestrator-core/pom.xml Thu Jan  9 20:31:45 2014
@@ -44,5 +44,10 @@ the License. -->
             <artifactId>airavata-common-utils</artifactId>
             <version>${project.version}</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-gfac-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
     </dependencies>
 </project>

Modified: airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/Orchestrator.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/Orchestrator.java?rev=1556943&r1=1556942&r2=1556943&view=diff
==============================================================================
--- airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/Orchestrator.java (original)
+++ airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/Orchestrator.java Thu Jan  9 20:31:45 2014
@@ -21,6 +21,7 @@
 package org.apache.airavata.orchestrator.core;
 
 import org.apache.airavata.orchestrator.core.exception.OrchestratorException;
+import org.apache.airavata.registry.api.JobRequest;
 
 /*
    This is the interface for orchestrator functionality exposed to the out side of the
@@ -55,7 +56,7 @@ public interface Orchestrator {
      * @return
      * @throws OrchestratorException
      */
-    boolean acceptExperiment(JobRequest request) throws OrchestratorException;
+    boolean launchExperiment(JobRequest request) throws OrchestratorException;
 
     /**
      * This is like a cron job which runs continuously and take available jobs to

Modified: airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/OrchestratorConfiguration.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/OrchestratorConfiguration.java?rev=1556943&r1=1556942&r2=1556943&view=diff
==============================================================================
--- airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/OrchestratorConfiguration.java (original)
+++ airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/OrchestratorConfiguration.java Thu Jan  9 20:31:45 2014
@@ -20,6 +20,10 @@
 */
 package org.apache.airavata.orchestrator.core;
 
+import org.apache.airavata.client.api.AiravataAPI;
+
+import java.net.URL;
+
 public class OrchestratorConfiguration {
 
     private String submitterClass;
@@ -29,7 +33,20 @@ public class OrchestratorConfiguration {
     private int threadPoolSize = 10;
 
     private boolean startSubmitter = false;
-    /* setter methods */
+
+    private AiravataAPI airavataAPI;
+
+    private URL brokerURL;
+
+
+    public URL getBrokerURL() {
+        return brokerURL;
+    }
+
+    public void setBrokerURL(URL brokerURL) {
+        this.brokerURL = brokerURL;
+    }
+
     public String getSubmitterClass() {
         return submitterClass;
     }
@@ -42,7 +59,6 @@ public class OrchestratorConfiguration {
         return threadPoolSize;
     }
 
-    /* setter methods */
     public void setSubmitterClass(String submitterClass) {
         this.submitterClass = submitterClass;
     }
@@ -62,4 +78,12 @@ public class OrchestratorConfiguration {
     public void setStartSubmitter(boolean startSubmitter) {
         this.startSubmitter = startSubmitter;
     }
+
+    public AiravataAPI getAiravataAPI() {
+        return airavataAPI;
+    }
+
+    public void setAiravataAPI(AiravataAPI airavataAPI) {
+        this.airavataAPI = airavataAPI;
+    }
 }

Modified: airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/PullBasedOrchestrator.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/PullBasedOrchestrator.java?rev=1556943&r1=1556942&r2=1556943&view=diff
==============================================================================
--- airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/PullBasedOrchestrator.java (original)
+++ airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/PullBasedOrchestrator.java Thu Jan  9 20:31:45 2014
@@ -20,23 +20,24 @@
 */
 package org.apache.airavata.orchestrator.core;
 
+import org.apache.airavata.client.AiravataAPIFactory;
+import org.apache.airavata.client.api.AiravataAPI;
+import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
 import org.apache.airavata.common.exception.AiravataConfigurationException;
+import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.common.utils.AiravataJobState;
+import org.apache.airavata.common.utils.ServerSettings;
 import org.apache.airavata.orchestrator.core.context.OrchestratorContext;
 import org.apache.airavata.orchestrator.core.exception.OrchestratorException;
 import org.apache.airavata.orchestrator.core.gfac.GFACInstance;
-import org.apache.airavata.orchestrator.core.utils.OrchestratorConstants;
 import org.apache.airavata.orchestrator.core.utils.OrchestratorUtils;
-import org.apache.airavata.persistance.registry.jpa.impl.AiravataJPARegistry;
 import org.apache.airavata.registry.api.*;
 import org.apache.airavata.registry.api.exception.RegistryException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import java.io.IOException;
-import java.net.URL;
 import java.util.*;
-import java.util.concurrent.Executor;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 
@@ -49,6 +50,8 @@ public class PullBasedOrchestrator imple
 
     ExecutorService executor;
 
+    AiravataAPI airavataAPI;
+
     public boolean initialize() throws OrchestratorException {
         try {
             /* Initializing the OrchestratorConfiguration object */
@@ -73,12 +76,10 @@ public class PullBasedOrchestrator imple
 
             orchestratorContext = new OrchestratorContext(gfacInstanceList);
             orchestratorContext.setOrchestratorConfiguration(orchestratorConfiguration);
-
+            orchestratorConfiguration.setAiravataAPI(getAiravataAPI());
             /* Starting submitter thread pool */
 
             executor = Executors.newFixedThreadPool(orchestratorConfiguration.getThreadPoolSize());
-
-
         } catch (RegistryException e) {
             logger.error("Failed to initializing Orchestrator");
             OrchestratorException orchestratorException = new OrchestratorException(e);
@@ -117,7 +118,7 @@ public class PullBasedOrchestrator imple
         return experimentID;
     }
 
-    public boolean acceptExperiment(JobRequest request) throws OrchestratorException {
+    public boolean launchExperiment(JobRequest request) throws OrchestratorException {
         // validate the jobRequest first
         if (!OrchestratorUtils.validateJobRequest(request)) {
             logger.error("Invalid Job request sent, Experiment creation failed");
@@ -141,4 +142,18 @@ public class PullBasedOrchestrator imple
             executor.execute(jobSubmitterWorker);
         }
     }
+    private AiravataAPI getAiravataAPI(){
+        if (airavataAPI==null) {
+			try {
+				String systemUserName = ServerSettings.getSystemUser();
+				String gateway = ServerSettings.getSystemUserGateway();
+				airavataAPI = AiravataAPIFactory.getAPI(gateway, systemUserName);
+			} catch (ApplicationSettingsException e) {
+				logger.error("Unable to read the properties file", e);
+			} catch (AiravataAPIInvocationException e) {
+				logger.error("Unable to create Airavata API", e);
+			}
+		}
+		return airavataAPI;
+    }
 }

Copied: airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/EmbeddedGFACJobSubmitter.java (from r1556871, airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/SimpleJobSubmitter.java)
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/EmbeddedGFACJobSubmitter.java?p2=airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/EmbeddedGFACJobSubmitter.java&p1=airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/SimpleJobSubmitter.java&r1=1556871&r2=1556943&rev=1556943&view=diff
==============================================================================
--- airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/SimpleJobSubmitter.java (original)
+++ airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/EmbeddedGFACJobSubmitter.java Thu Jan  9 20:31:45 2014
@@ -20,23 +20,58 @@
 */
 package org.apache.airavata.orchestrator.core.impl;
 
+import org.apache.airavata.client.api.AiravataAPI;
+import org.apache.airavata.client.api.exception.AiravataAPIInvocationException;
+import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.common.utils.AiravataJobState;
+import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.common.utils.XMLUtil;
+import org.apache.airavata.common.workflow.execution.context.WorkflowContextHeaderBuilder;
+import org.apache.airavata.commons.gfac.type.ApplicationDescription;
+import org.apache.airavata.commons.gfac.type.HostDescription;
+import org.apache.airavata.commons.gfac.type.ServiceDescription;
+import org.apache.airavata.gfac.Constants;
+import org.apache.airavata.gfac.GFacAPI;
+import org.apache.airavata.gfac.GFacConfiguration;
+import org.apache.airavata.gfac.GFacException;
+import org.apache.airavata.gfac.context.ApplicationContext;
+import org.apache.airavata.gfac.context.JobExecutionContext;
+import org.apache.airavata.gfac.context.MessageContext;
+import org.apache.airavata.gfac.scheduler.HostScheduler;
 import org.apache.airavata.orchestrator.core.context.OrchestratorContext;
 import org.apache.airavata.orchestrator.core.gfac.GFACInstance;
 import org.apache.airavata.orchestrator.core.job.JobSubmitter;
+import org.apache.airavata.registry.api.JobRequest;
 import org.apache.airavata.registry.api.exception.RegistryException;
-import org.junit.After;
+import org.apache.axiom.om.OMElement;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-
+import org.xml.sax.SAXException;
+import org.xmlpull.v1.builder.XmlElement;
+import xsul.wsif.impl.WSIFMessageElement;
+
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.xpath.XPathExpressionException;
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+import java.util.ArrayList;
 import java.util.List;
+import java.util.Map;
+import java.util.Properties;
 
-public class SimpleJobSubmitter implements JobSubmitter{
-    private final static Logger logger = LoggerFactory.getLogger(SimpleJobSubmitter.class);
+/**
+ * This is the simplest implementation for JobSubmitter,
+ * This is calling gfac invocation methods to invoke the gfac embedded mode,so this does not really implement
+ * the selectGFACInstance method
+ */
+public class EmbeddedGFACJobSubmitter implements JobSubmitter {
+    private final static Logger logger = LoggerFactory.getLogger(EmbeddedGFACJobSubmitter.class);
 
     private OrchestratorContext orchestratorContext;
 
-    public SimpleJobSubmitter(OrchestratorContext orchestratorContext) {
+    public EmbeddedGFACJobSubmitter(OrchestratorContext orchestratorContext) {
         this.orchestratorContext = orchestratorContext;
     }
 
@@ -47,19 +82,68 @@ public class SimpleJobSubmitter implemen
 
     public boolean submitJob(GFACInstance gfac, List<String> experimentIDList) {
 
-        for(int i=0;i<experimentIDList.size();i++){
+        for (int i = 0; i < experimentIDList.size(); i++) {
             try {
                 // once its fetched it's status will changed to fetched state
-                String s = orchestratorContext.getRegistry().fetchAcceptedJob(experimentIDList.get(i));
+                JobRequest jobRequest = orchestratorContext.getRegistry().fetchAcceptedJob(experimentIDList.get(i));
+                String hostName = jobRequest.getHostDescription().getType().getHostAddress();
+                String serviceName = jobRequest.getServiceDescription().getType().getName();
                 //todo submit the jobs
 
                 //after successfully submitting the jobs set the status of the job to submitted
 
                 orchestratorContext.getRegistry().changeStatus(experimentIDList.get(i), AiravataJobState.State.SUBMITTED);
-            } catch (RegistryException e) {
+                AiravataAPI airavataAPI = orchestratorContext.getOrchestratorConfiguration().getAiravataAPI();
+                HostDescription registeredHost = null;
+                ServiceDescription serviceDescription = airavataAPI.getApplicationManager().getServiceDescription(serviceName);
+                if (hostName == null) {
+                    List<HostDescription> registeredHosts = new ArrayList<HostDescription>();
+                    Map<String, ApplicationDescription> applicationDescriptors = airavataAPI.getApplicationManager().getApplicationDescriptors(serviceName);
+                    for (String hostDescName : applicationDescriptors.keySet()) {
+                        registeredHosts.add(airavataAPI.getApplicationManager().getHostDescription(hostDescName));
+                    }
+                    Class<? extends HostScheduler> aClass = Class.forName(ServerSettings.getHostScheduler()).asSubclass(HostScheduler.class);
+                    HostScheduler hostScheduler = aClass.newInstance();
+                    registeredHost = hostScheduler.schedule(registeredHosts);
+                } else {
+                    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
+                URL resource = EmbeddedGFACJobSubmitter.class.getClassLoader().getResource("gfac-config.xml");
+                Properties configurationProperties = ServerSettings.getProperties();
+                GFacConfiguration gFacConfiguration = GFacConfiguration.create(new File(resource.getPath()), airavataAPI, configurationProperties);
+
+                JobExecutionContext jobExecutionContext = new JobExecutionContext(gFacConfiguration, serviceName);
+                //Here we get only the contextheader information sent specific for this node
+                //Add security context
+
+
+
+                jobExecutionContext.setProperty(Constants.PROP_TOPIC, experimentIDList.get(i));
+                jobExecutionContext.setProperty(Constants.PROP_BROKER_URL, orchestratorContext.getOrchestratorConfiguration().getBrokerURL().toString());
+
+
+                ApplicationContext applicationContext = new ApplicationContext();
+                applicationContext.setApplicationDeploymentDescription(applicationDescription);
+                applicationContext.setHostDescription(registeredHost);
+                applicationContext.setServiceDescription(serviceDescription);
+
+                jobExecutionContext.setApplicationContext(applicationContext);
+
+                jobExecutionContext.setOutMessageContext(new MessageContext(jobRequest.getOutputParameters()));
+                jobExecutionContext.setInMessageContext(new MessageContext(jobRequest.getInputParameters()));
+
+                //addSecurityContext(registeredHost, configurationProperties, jobExecutionContext,
+                  //      configuration.getContextHeader());
+                GFacAPI gfacAPI1 = new GFacAPI();
+                gfacAPI1.submitJob(jobExecutionContext);
+            } catch (Exception e) {
                 logger.error("Error getting job related information");
             }
         }
-	return true;
+        return true;
     }
 }

Modified: airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/utils/OrchestratorUtils.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/utils/OrchestratorUtils.java?rev=1556943&r1=1556942&r2=1556943&view=diff
==============================================================================
--- airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/utils/OrchestratorUtils.java (original)
+++ airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/utils/OrchestratorUtils.java Thu Jan  9 20:31:45 2014
@@ -20,10 +20,10 @@
 */
 package org.apache.airavata.orchestrator.core.utils;
 
-import org.apache.airavata.orchestrator.core.JobRequest;
 import org.apache.airavata.orchestrator.core.JobSubmitterWorker;
 import org.apache.airavata.orchestrator.core.OrchestratorConfiguration;
 import org.apache.airavata.orchestrator.core.exception.OrchestratorException;
+import org.apache.airavata.registry.api.JobRequest;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

Modified: airavata/trunk/modules/orchestrator/orchestrator-core/src/main/resources/orchestrator.properties
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/orchestrator/orchestrator-core/src/main/resources/orchestrator.properties?rev=1556943&r1=1556942&r2=1556943&view=diff
==============================================================================
--- airavata/trunk/modules/orchestrator/orchestrator-core/src/main/resources/orchestrator.properties (original)
+++ airavata/trunk/modules/orchestrator/orchestrator-core/src/main/resources/orchestrator.properties Thu Jan  9 20:31:45 2014
@@ -1,4 +1,4 @@
-job.submitter=org.apache.airavata.orchestrator.core.impl.SimpleJobSubmitter
+job.submitter=org.apache.airavata.orchestrator.core.impl.EmbeddedGFACJobSubmitter
 submitter.interval=10000
 threadpool.size=10
 start.submitter=true
\ No newline at end of file

Modified: airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/AiravataJPARegistry.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/AiravataJPARegistry.java?rev=1556943&r1=1556942&r2=1556943&view=diff
==============================================================================
--- airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/AiravataJPARegistry.java (original)
+++ airavata/trunk/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/AiravataJPARegistry.java Thu Jan  9 20:31:45 2014
@@ -69,24 +69,8 @@ import org.apache.airavata.persistance.r
 import org.apache.airavata.persistance.registry.jpa.resources.UserWorkflowResource;
 import org.apache.airavata.persistance.registry.jpa.resources.WorkerResource;
 import org.apache.airavata.persistance.registry.jpa.resources.WorkflowDataResource;
-import org.apache.airavata.registry.api.AiravataExperiment;
-import org.apache.airavata.registry.api.AiravataRegistry2;
-import org.apache.airavata.registry.api.AiravataRegistryFactory;
-import org.apache.airavata.registry.api.AiravataSubRegistry;
-import org.apache.airavata.registry.api.AiravataUser;
-import org.apache.airavata.registry.api.ConfigurationRegistry;
-import org.apache.airavata.registry.api.DescriptorRegistry;
-import org.apache.airavata.registry.api.ExecutionErrors;
+import org.apache.airavata.registry.api.*;
 import org.apache.airavata.registry.api.ExecutionErrors.Source;
-import org.apache.airavata.registry.api.Gateway;
-import org.apache.airavata.registry.api.PasswordCallback;
-import org.apache.airavata.registry.api.ProjectsRegistry;
-import org.apache.airavata.registry.api.ProvenanceRegistry;
-import org.apache.airavata.registry.api.PublishedWorkflowRegistry;
-import org.apache.airavata.registry.api.ResourceMetadata;
-import org.apache.airavata.registry.api.UserRegistry;
-import org.apache.airavata.registry.api.UserWorkflowRegistry;
-import org.apache.airavata.registry.api.WorkspaceProject;
 import org.apache.airavata.registry.api.exception.AiravataRegistryUninitializedException;
 import org.apache.airavata.registry.api.exception.GatewayNotRegisteredException;
 import org.apache.airavata.registry.api.exception.RegistryAPIVersionIncompatibleException;
@@ -2620,7 +2604,7 @@ public class AiravataJPARegistry extends
         return null;  //To change body of implemented methods use File | Settings | File Templates.
     }
 
-    public String fetchAcceptedJob(String experimentID) throws RegistryException {
+    public JobRequest fetchAcceptedJob(String experimentID) throws RegistryException {
         return null;  //To change body of implemented methods use File | Settings | File Templates.
     }
 

Added: airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/JobRequest.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/JobRequest.java?rev=1556943&view=auto
==============================================================================
--- airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/JobRequest.java (added)
+++ airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/JobRequest.java Thu Jan  9 20:31:45 2014
@@ -0,0 +1,103 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.registry.api;
+
+import org.apache.airavata.commons.gfac.type.ApplicationDescription;
+import org.apache.airavata.commons.gfac.type.HostDescription;
+import org.apache.airavata.commons.gfac.type.ServiceDescription;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Map;
+
+public class JobRequest {
+    private final static Logger logger = LoggerFactory.getLogger(JobRequest.class);
+
+    private String userName;
+
+    private String experimentID;
+
+    private HostDescription hostDescription;
+
+    private ApplicationDescription applicationDescription;
+
+    private ServiceDescription serviceDescription;
+
+    private Map<String,Object> inputParameters;
+
+    private Map<String,Object> outputParameters;
+
+    public Map<String, Object> getInputParameters() {
+        return inputParameters;
+    }
+
+    public void setInputParameters(Map<String, Object> inputParameters) {
+        this.inputParameters = inputParameters;
+    }
+
+    public Map<String, Object> getOutputParameters() {
+        return outputParameters;
+    }
+
+    public void setOutputParameters(Map<String, Object> outputParameters) {
+        this.outputParameters = outputParameters;
+    }
+
+    public ServiceDescription getServiceDescription() {
+        return serviceDescription;
+    }
+
+    public void setServiceDescription(ServiceDescription serviceDescription) {
+        this.serviceDescription = serviceDescription;
+    }
+
+    public HostDescription getHostDescription() {
+        return hostDescription;
+    }
+
+    public void setHostDescription(HostDescription hostDescription) {
+        this.hostDescription = hostDescription;
+    }
+
+    public ApplicationDescription getApplicationDescription() {
+        return applicationDescription;
+    }
+
+    public void setApplicationDescription(ApplicationDescription applicationDescription) {
+        this.applicationDescription = applicationDescription;
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    public String getExperimentID() {
+        return experimentID;
+    }
+
+    public void setExperimentID(String experimentID) {
+        this.experimentID = experimentID;
+    }
+}

Modified: airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/OrchestratorRegistry.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/OrchestratorRegistry.java?rev=1556943&r1=1556942&r2=1556943&view=diff
==============================================================================
--- airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/OrchestratorRegistry.java (original)
+++ airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/OrchestratorRegistry.java Thu Jan  9 20:31:45 2014
@@ -87,7 +87,7 @@ public interface OrchestratorRegistry ex
      * @return experimentID
      * @throws RegistryException
      */
-    String fetchAcceptedJob(String experimentID)throws RegistryException;
+    JobRequest fetchAcceptedJob(String experimentID)throws RegistryException;
 
     /**
      * This will return all the hanged jobs, the logic to determine

Modified: airavata/trunk/modules/rest/client/src/main/java/org/apache/airavata/rest/client/RegistryClient.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/rest/client/src/main/java/org/apache/airavata/rest/client/RegistryClient.java?rev=1556943&r1=1556942&r2=1556943&view=diff
==============================================================================
--- airavata/trunk/modules/rest/client/src/main/java/org/apache/airavata/rest/client/RegistryClient.java (original)
+++ airavata/trunk/modules/rest/client/src/main/java/org/apache/airavata/rest/client/RegistryClient.java Thu Jan  9 20:31:45 2014
@@ -1046,7 +1046,7 @@ public class RegistryClient extends Aira
         return null;  //To change body of implemented methods use File | Settings | File Templates.
     }
 
-    public String fetchAcceptedJob(String experimentID) throws RegistryException {
+    public JobRequest fetchAcceptedJob(String experimentID) throws RegistryException {
         return null;  //To change body of implemented methods use File | Settings | File Templates.
     }