airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lah...@apache.org
Subject svn commit: r1557777 - in /airavata/trunk/modules: commons/utils/src/main/java/org/apache/airavata/common/utils/ orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/ orchestrator/orchestrator-core/src/main/java/org/apache...
Date Mon, 13 Jan 2014 17:23:52 GMT
Author: lahiru
Date: Mon Jan 13 17:23:51 2014
New Revision: 1557777

URL: http://svn.apache.org/r1557777
Log:
more design level changes to orchestrator.

Modified:
    airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/AiravataJobState.java
    airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/HangedJobWorker.java
    airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/NewJobWorker.java
    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/context/OrchestratorContext.java
    airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/EmbeddedGFACJobSubmitter.java
    airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/job/JobSubmitter.java
    airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/utils/OrchestratorConstants.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=1557777&r1=1557776&r2=1557777&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
Mon Jan 13 17:23:51 2014
@@ -25,6 +25,18 @@ These are the job statuses shared in dat
 gfac instances
  */
 public class AiravataJobState {
+
+    private State jobState;
+
+    public State getJobState() {
+        return jobState;
+    }
+
+    public void setJobState(State jobState) {
+        this.jobState = jobState;
+    }
+
+
     public enum State {
         CREATED {
             public String toString() {
@@ -71,11 +83,6 @@ public class AiravataJobState {
                 return "PAUSED";
             }
         },
-        FINISHED {
-            public String toString() {
-                return "FINISHED";
-            }
-        },
         PENDING {
             public String toString() {
                 return "PENDING";
@@ -91,6 +98,11 @@ public class AiravataJobState {
                 return "DONE";
             }
         },
+        CANCELLED {
+            public String toString() {
+                return "CANCELLED";
+            }
+        },
         UNKNOWN {
             public String toString() {
                 return "UNKNOWN";

Modified: airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/HangedJobWorker.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/HangedJobWorker.java?rev=1557777&r1=1557776&r2=1557777&view=diff
==============================================================================
--- airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/HangedJobWorker.java
(original)
+++ airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/HangedJobWorker.java
Mon Jan 13 17:23:51 2014
@@ -30,6 +30,10 @@ import org.slf4j.LoggerFactory;
 
 import java.util.List;
 
+/**
+ * this worker is handling hanged jobs and invoke the submitter
+ * after finding hanged jobs
+ */
 public class HangedJobWorker implements Runnable{
      private final static Logger logger = LoggerFactory.getLogger(HangedJobWorker.class);
 
@@ -48,6 +52,7 @@ public class HangedJobWorker implements 
             submitInterval = this.orchestratorContext.getOrchestratorConfiguration().getSubmitterInterval();
             Class<? extends JobSubmitter> aClass = Class.forName(submitterClass.trim()).asSubclass(JobSubmitter.class);
             jobSubmitter = aClass.newInstance();
+            jobSubmitter.initialize(this.orchestratorContext.getRegistry());
         } catch (ClassNotFoundException e) {
             logger.error("Error while loading Job Submitter");
         } catch (InstantiationException e) {
@@ -73,7 +78,7 @@ public class HangedJobWorker implements 
             /* Here the worker pick bunch of jobs available to submit and submit that to
a single
               GFAC instance, we do not handle job by job submission to each gfac instance
             */
-            GFACInstance gfacInstance = jobSubmitter.selectGFACInstance(orchestratorContext);
+            GFACInstance gfacInstance = jobSubmitter.selectGFACInstance();
 
             // Now we have picked a gfac instance to submit set of jobs at this time, now
its time to
             // select what are the jobs available to submit
@@ -98,7 +103,7 @@ public class HangedJobWorker implements 
                 jobSubmitter.submitJob(gfacInstance,allHangedJobs);
 
                 /* After submitting available jobs try to schedule again and then submit*/
-                jobSubmitter.submitJob(jobSubmitter.selectGFACInstance(orchestratorContext),allHangedJobs);
+                jobSubmitter.submitJob(jobSubmitter.selectGFACInstance(),allHangedJobs);
             } catch (RegistryException e) {
                 logger.error("Error while trying to retrieve available ");
             }

Modified: airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/NewJobWorker.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/NewJobWorker.java?rev=1557777&r1=1557776&r2=1557777&view=diff
==============================================================================
--- airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/NewJobWorker.java
(original)
+++ airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/NewJobWorker.java
Mon Jan 13 17:23:51 2014
@@ -30,6 +30,10 @@ import org.slf4j.LoggerFactory;
 
 import java.util.List;
 
+/*
+This is the worker class to handle the jobs stored in to registry as
+fresh and this will pick those jobs and invoke the defined submitter
+ */
 public class NewJobWorker implements Runnable {
     private final static Logger logger = LoggerFactory.getLogger(NewJobWorker.class);
 
@@ -48,6 +52,7 @@ public class NewJobWorker implements Run
             submitInterval = this.orchestratorContext.getOrchestratorConfiguration().getSubmitterInterval();
             Class<? extends JobSubmitter> aClass = Class.forName(submitterClass.trim()).asSubclass(JobSubmitter.class);
             jobSubmitter = aClass.newInstance();
+            jobSubmitter.initialize(this.orchestratorContext.getRegistry());
         } catch (ClassNotFoundException e) {
             logger.error("Error while loading Job Submitter");
         } catch (InstantiationException e) {
@@ -73,7 +78,7 @@ public class NewJobWorker implements Run
             /* Here the worker pick bunch of jobs available to submit and submit that to
a single
               GFAC instance, we do not handle job by job submission to each gfac instance
             */
-            GFACInstance gfacInstance = jobSubmitter.selectGFACInstance(orchestratorContext);
+            GFACInstance gfacInstance = jobSubmitter.selectGFACInstance();
 
             // Now we have picked a gfac instance to submit set of jobs at this time, now
its time to
             // select what are the jobs available to submit

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=1557777&r1=1557776&r2=1557777&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
Mon Jan 13 17:23:51 2014
@@ -59,6 +59,16 @@ public interface Orchestrator {
     boolean launchExperiment(JobRequest request) throws OrchestratorException;
 
     /**
+     * This method can be used to cancel a running experiment, if job is already finished
it
+     * throws an exception. If job is not yet submitted it will just change the status to
cancelled,
+     * if Job is running it will be killed from the resource and make the status to cancelled
+     * @param experimentID
+     * @return
+     * @throws OrchestratorException
+     */
+    boolean cancelExperiment(String experimentID)throws OrchestratorException;
+
+    /**
      * This is like a cron job which runs continuously and take available jobs to
      * submit to GFAC and submit them to GFAC
      * @throws OrchestratorException

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=1557777&r1=1557776&r2=1557777&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
Mon Jan 13 17:23:51 2014
@@ -42,6 +42,16 @@ public class OrchestratorConfiguration {
 
     private URL brokerURL;
 
+    private boolean embeddedMode;
+
+
+    public boolean isEmbeddedMode() {
+        return embeddedMode;
+    }
+
+    public void setEmbeddedMode(boolean embeddedMode) {
+        this.embeddedMode = embeddedMode;
+    }
 
     public URL getBrokerURL() {
         return brokerURL;

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=1557777&r1=1557776&r2=1557777&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
Mon Jan 13 17:23:51 2014
@@ -59,22 +59,25 @@ public class PullBasedOrchestrator imple
 
             /* initializing the Orchestratorcontext object */
             airavataRegistry = AiravataRegistryFactory.getRegistry(new Gateway("default"),
new AiravataUser("admin"));
-            Map<String, Integer> gfacNodeList = airavataRegistry.getGFACNodeList();
-            if (gfacNodeList.size() == 0) {
-                String error = "No GFAC instances available in the system, Can't initialize
Orchestrator";
-                logger.error(error);
-                throw new OrchestratorException(error);
-            }
-            Set<String> uriList = gfacNodeList.keySet();
-            Iterator<String> iterator = uriList.iterator();
-            List<GFACInstance> gfacInstanceList = new ArrayList<GFACInstance>();
-            while (iterator.hasNext()) {
-                String uri = iterator.next();
-                Integer integer = gfacNodeList.get(uri);
-                gfacInstanceList.add(new GFACInstance(uri, integer));
+            // todo move this code to gfac service mode Jobsubmitter,
+            // todo this is ugly, SHOULD fix these isEmbedded mode code from Orchestrator
+            if (!orchestratorConfiguration.isEmbeddedMode()) {
+                Map<String, Integer> gfacNodeList = airavataRegistry.getGFACNodeList();
+                if (gfacNodeList.size() == 0) {
+                    String error = "No GFAC instances available in the system, Can't initialize
Orchestrator";
+                    logger.error(error);
+                    throw new OrchestratorException(error);
+                }
+                Set<String> uriList = gfacNodeList.keySet();
+                Iterator<String> iterator = uriList.iterator();
+                List<GFACInstance> gfacInstanceList = new ArrayList<GFACInstance>();
+                while (iterator.hasNext()) {
+                    String uri = iterator.next();
+                    Integer integer = gfacNodeList.get(uri);
+                    gfacInstanceList.add(new GFACInstance(uri, integer));
+                }
             }
-
-            orchestratorContext = new OrchestratorContext(gfacInstanceList);
+            orchestratorContext = new OrchestratorContext();
             orchestratorContext.setOrchestratorConfiguration(orchestratorConfiguration);
             orchestratorConfiguration.setAiravataAPI(getAiravataAPI());
             /* Starting submitter thread pool */
@@ -127,7 +130,16 @@ public class PullBasedOrchestrator imple
             logger.error("Invalid Job request sent, Experiment creation failed");
             return false;
         }
-        String experimentID = request.getExperimentID();
+        String experimentID = null;
+        // we give higher priority to userExperimentID
+        if (request.getUserExperimentID() != null) {
+            experimentID = request.getUserExperimentID();
+        } else if (request.getSystemExperimentID() != null) {
+            experimentID = request.getSystemExperimentID();
+        } else {
+            logger.error("Invalid Experiment ID given: " + request.getUserName());
+            return false;
+        }
         //todo use a more concrete user type in to this
         String username = request.getUserName();
         try {
@@ -145,12 +157,38 @@ public class PullBasedOrchestrator imple
         NewJobWorker jobSubmitterWorker = new NewJobWorker(orchestratorContext);
         executor.execute(jobSubmitterWorker);
 
-        for (int i = 0; i < orchestratorContext.getOrchestratorConfiguration().getThreadPoolSize()-1;
i++) {
+        for (int i = 0; i < orchestratorContext.getOrchestratorConfiguration().getThreadPoolSize()
- 1; i++) {
             HangedJobWorker hangedJobWorker = new HangedJobWorker(orchestratorContext);
             executor.execute(hangedJobWorker);
         }
     }
 
+    public boolean cancelExperiment(String experimentID) throws OrchestratorException {
+        try {
+            AiravataJobState state = orchestratorContext.getRegistry().getState(experimentID);
+            if (state.getJobState().equals(AiravataJobState.State.RUNNING) || state.getJobState().equals(AiravataJobState.State.PENDING)
||
+                    state.getJobState().equals(AiravataJobState.State.ACTIVE) || state.getJobState().equals(AiravataJobState.State.SUBMITTED))
{
+
+                //todo perform cancelling and last peform the database update
+
+                orchestratorContext.getRegistry().changeStatus(experimentID, AiravataJobState.State.CANCELLED);
+            } else if (state.getJobState().equals(AiravataJobState.State.DONE)) {
+                String error = "Job is already Finished so cannot cancel the job " + experimentID;
+                logger.error(error);
+                new OrchestratorException(error);
+            }else{
+                // do nothing but simply change the job state to cancelled because job is
not yet submitted to the resource
+                orchestratorContext.getRegistry().changeStatus(experimentID, AiravataJobState.State.CANCELLED);
+            }
+
+        } catch (RegistryException e) {
+            String error = "Error reading the job state for the given Experiment ID: " +
experimentID;
+            logger.error(error);
+            throw new OrchestratorException(error, e);
+        }
+        return true;
+    }
+
     private AiravataAPI getAiravataAPI() {
         if (airavataAPI == null) {
             try {

Modified: airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/context/OrchestratorContext.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/context/OrchestratorContext.java?rev=1557777&r1=1557776&r2=1557777&view=diff
==============================================================================
--- airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/context/OrchestratorContext.java
(original)
+++ airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/context/OrchestratorContext.java
Mon Jan 13 17:23:51 2014
@@ -42,6 +42,9 @@ public class OrchestratorContext {
         this.gfacInstanceList = new ArrayList<GFACInstance>();
     }
 
+    public OrchestratorContext() {
+    }
+
     public List<GFACInstance> getGfacInstanceList() {
         return gfacInstanceList;
     }
@@ -58,7 +61,7 @@ public class OrchestratorContext {
         this.orchestratorConfiguration = orchestratorConfiguration;
     }
 
-    public OrchestratorRegistry getRegistry() {
+    public AiravataRegistry2 getRegistry() {
         return registry;
     }
 

Modified: airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/EmbeddedGFACJobSubmitter.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/EmbeddedGFACJobSubmitter.java?rev=1557777&r1=1557776&r2=1557777&view=diff
==============================================================================
--- airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/EmbeddedGFACJobSubmitter.java
(original)
+++ airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/EmbeddedGFACJobSubmitter.java
Mon Jan 13 17:23:51 2014
@@ -41,6 +41,7 @@ import org.apache.airavata.gfac.schedule
 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.AiravataRegistry2;
 import org.apache.airavata.registry.api.JobRequest;
 import org.apache.airavata.registry.api.exception.RegistryException;
 import org.apache.axiom.om.OMElement;
@@ -75,8 +76,12 @@ public class EmbeddedGFACJobSubmitter im
         this.orchestratorContext = orchestratorContext;
     }
 
-    public GFACInstance selectGFACInstance(OrchestratorContext context) {
-        return null;
+    public void initialize(AiravataRegistry2 registry2) {
+        // since this is embedded mode we do not use gfacinstance information
+    }
+
+    public GFACInstance selectGFACInstance() {
+        return null;  //To change body of implemented methods use File | Settings | File
Templates.
     }
 
 

Modified: airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/job/JobSubmitter.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/job/JobSubmitter.java?rev=1557777&r1=1557776&r2=1557777&view=diff
==============================================================================
--- airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/job/JobSubmitter.java
(original)
+++ airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/job/JobSubmitter.java
Mon Jan 13 17:23:51 2014
@@ -22,6 +22,7 @@ package org.apache.airavata.orchestrator
 
 import org.apache.airavata.orchestrator.core.context.OrchestratorContext;
 import org.apache.airavata.orchestrator.core.gfac.GFACInstance;
+import org.apache.airavata.registry.api.AiravataRegistry2;
 
 import java.util.List;
 
@@ -34,11 +35,14 @@ import java.util.List;
  */
 public interface JobSubmitter {
 
+
+    void initialize(AiravataRegistry2 registry2);
+
     /**
-     * @param context
+     * This will return a single GFACInstance among multiple if available
      * @return
      */
-    GFACInstance selectGFACInstance(OrchestratorContext context);
+    GFACInstance selectGFACInstance();
 
     /**
      * @param gfac

Modified: airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/utils/OrchestratorConstants.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/utils/OrchestratorConstants.java?rev=1557777&r1=1557776&r2=1557777&view=diff
==============================================================================
--- airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/utils/OrchestratorConstants.java
(original)
+++ airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/utils/OrchestratorConstants.java
Mon Jan 13 17:23:51 2014
@@ -32,4 +32,5 @@ public class OrchestratorConstants {
     public static final String SUBMIT_INTERVAL = "submitter.interval";
     public static final String THREAD_POOL_SIZE = "threadpool.size";
     public static final String START_SUBMITTER = "start.submitter";
+    public static final String EMBEDDED_MODE = "embedded.mode";
 }

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=1557777&r1=1557776&r2=1557777&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
Mon Jan 13 17:23:51 2014
@@ -52,6 +52,7 @@ public class OrchestratorUtils {
         orchestratorConfiguration.setSubmitterInterval((Integer) orchestratorProps.get(OrchestratorConstants.SUBMIT_INTERVAL));
         orchestratorConfiguration.setThreadPoolSize((Integer) orchestratorProps.get(OrchestratorConstants.THREAD_POOL_SIZE));
         orchestratorConfiguration.setStartSubmitter(Boolean.valueOf(orchestratorProps.getProperty(OrchestratorConstants.START_SUBMITTER)));
+        orchestratorConfiguration.setEmbeddedMode(Boolean.valueOf(orchestratorProps.getProperty(OrchestratorConstants.EMBEDDED_MODE)));
         return orchestratorConfiguration;
     }
 

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=1557777&r1=1557776&r2=1557777&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
Mon Jan 13 17:23:51 2014
@@ -1,4 +1,5 @@
 job.submitter=org.apache.airavata.orchestrator.core.impl.EmbeddedGFACJobSubmitter
 submitter.interval=10000
 threadpool.size=10
-start.submitter=true
\ No newline at end of file
+start.submitter=true
+embedded.mode=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=1557777&r1=1557776&r2=1557777&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
Mon Jan 13 17:23:51 2014
@@ -2562,19 +2562,24 @@ public class AiravataJPARegistry extends
 		}
     }
 
-    public Map<String, Integer> getGFACNodeList() throws RegistryException {
-        return null;  //To change body of implemented methods use File | Settings | File
Templates.
-    }
-
     /**
      *These are the methods inherited from Orchestrator Registry
      */
 
 
+
     public List<URI> getLiveGFacURIs() throws RegistryException {
         return null;  //To change body of implemented methods use File | Settings | File
Templates.
     }
 
+    public Map<String, Integer> getGFACNodeList() throws RegistryException {
+        return null;  //To change body of implemented methods use File | Settings | File
Templates.
+    }
+
+    public boolean addGFACNode(String uri, int nodeID) throws RegistryException {
+        return false;  //To change body of implemented methods use File | Settings | File
Templates.
+    }
+
     public boolean storeExperiment(String userName, String experimentID) throws RegistryException
{
         return false;  //To change body of implemented methods use File | Settings | File
Templates.
     }

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=1557777&r1=1557776&r2=1557777&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
Mon Jan 13 17:23:51 2014
@@ -36,6 +36,15 @@ public interface OrchestratorRegistry ex
      */
     Map<String, Integer> getGFACNodeList() throws RegistryException;
 
+    /**
+     * This is the method to use to add a GFAC Node to registry,
+     * during embedded mode it should add a single gfac node
+     * @param uri
+     * @param nodeID
+     * @return
+     * @throws RegistryException
+     */
+    boolean addGFACNode(String uri, int nodeID)throws RegistryException;
 
     /**
      * This method will add an entry to job management table in database

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=1557777&r1=1557776&r2=1557777&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
Mon Jan 13 17:23:51 2014
@@ -1022,6 +1022,12 @@ public class RegistryClient extends Aira
 
 
     //todo implement these methods properly
+
+
+    public boolean addGFACNode(String uri, int nodeID) throws RegistryException {
+        return false;  //To change body of implemented methods use File | Settings | File
Templates.
+    }
+
     public Map<String, Integer> getGFACNodeList() throws RegistryException {
         return null;  //To change body of implemented methods use File | Settings | File
Templates.
     }



Mime
View raw message