airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lah...@apache.org
Subject svn commit: r1556863 - in /airavata/trunk/modules/orchestrator: ./ orchestrator-core/ orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/ orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/context/ orchestrator-cor...
Date Thu, 09 Jan 2014 16:36:55 GMT
Author: lahiru
Date: Thu Jan  9 16:36:55 2014
New Revision: 1556863

URL: http://svn.apache.org/r1556863
Log:
adding new orchestrator component.

Added:
    airavata/trunk/modules/orchestrator/
      - copied from r1552415, airavata/sandbox/orchestrator/
    airavata/trunk/modules/orchestrator/orchestrator-core/pom.xml
      - copied unchanged from r1556631, airavata/sandbox/orchestrator/orchestrator-core/pom.xml
    airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/ExperimentRequest.java
      - copied unchanged from r1556450, airavata/sandbox/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/ExperimentRequest.java
    airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/JobRequest.java
      - copied unchanged from r1556450, airavata/sandbox/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/JobSubmitterWorker.java
      - copied unchanged from r1556631, airavata/sandbox/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/JobSubmitterWorker.java
    airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/Orchestrator.java
      - copied unchanged from r1556631, airavata/sandbox/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
      - copied unchanged from r1556123, airavata/sandbox/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
      - copied, changed from r1556631, airavata/sandbox/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/
      - copied from r1553141, airavata/sandbox/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/context/
    airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/context/OrchestratorContext.java
      - copied unchanged from r1556631, airavata/sandbox/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/exception/
      - copied from r1553990, airavata/sandbox/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/exception/
    airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/gfac/
      - copied from r1553141, airavata/sandbox/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/gfac/
    airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/gfac/GFACInstance.java
      - copied unchanged from r1556123, airavata/sandbox/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/gfac/GFACInstance.java
    airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/
      - copied from r1553141, airavata/sandbox/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/
    airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/SimpleJobSubmitter.java
      - copied, changed from r1556123, airavata/sandbox/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/SimpleJobSubmitter.java
    airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/job/
      - copied from r1553141, airavata/sandbox/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/job/
    airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/job/JobSubmitter.java
      - copied unchanged from r1556631, airavata/sandbox/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/
      - copied from r1553990, airavata/sandbox/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/utils/
    airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/utils/OrchestratorConstants.java
      - copied unchanged from r1556123, airavata/sandbox/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
      - copied unchanged from r1556450, airavata/sandbox/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
      - copied unchanged from r1556123, airavata/sandbox/orchestrator/orchestrator-core/src/main/resources/orchestrator.properties
    airavata/trunk/modules/orchestrator/orchestrator-core/src/main/test/
      - copied from r1556123, airavata/sandbox/orchestrator/orchestrator-core/src/main/test/

Copied: airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/PullBasedOrchestrator.java
(from r1556631, airavata/sandbox/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?p2=airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/PullBasedOrchestrator.java&p1=airavata/sandbox/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/PullBasedOrchestrator.java&r1=1556631&r2=1556863&rev=1556863&view=diff
==============================================================================
--- airavata/sandbox/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 16:36:55 2014
@@ -108,7 +108,7 @@ public class PullBasedOrchestrator imple
         String username = request.getUserName();
         try {
             airavataRegistry.storeExperiment(username, experimentID);
-            airavataRegistry.changeStatus(username, experimentID, AiravataJobState.State.CREATED);
+            airavataRegistry.changeStatus(experimentID, AiravataJobState.State.CREATED);
         } catch (RegistryException e) {
             //todo put more meaningful error message
             logger.error("Failed to create experiment for the request from " + request.getUserName());
@@ -126,7 +126,7 @@ public class PullBasedOrchestrator imple
         String experimentID = request.getExperimentID();
         String username = request.getUserName();
         try {
-            airavataRegistry.changeStatus(username, experimentID, AiravataJobState.State.ACCEPTED);
+            airavataRegistry.changeStatus(experimentID, AiravataJobState.State.ACCEPTED);
         } catch (RegistryException e) {
             //todo put more meaningful error message
             logger.error("Failed to create experiment for the request from " + request.getUserName());

Copied: airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/SimpleJobSubmitter.java
(from r1556123, airavata/sandbox/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/SimpleJobSubmitter.java?p2=airavata/trunk/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/SimpleJobSubmitter.java&p1=airavata/sandbox/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/SimpleJobSubmitter.java&r1=1556123&r2=1556863&rev=1556863&view=diff
==============================================================================
--- airavata/sandbox/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/SimpleJobSubmitter.java
Thu Jan  9 16:36:55 2014
@@ -20,20 +20,45 @@
 */
 package org.apache.airavata.orchestrator.core.impl;
 
+import org.apache.airavata.common.utils.AiravataJobState;
 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.exception.RegistryException;
+import org.junit.After;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.util.List;
+
 public class SimpleJobSubmitter implements JobSubmitter{
     private final static Logger logger = LoggerFactory.getLogger(SimpleJobSubmitter.class);
 
+    private OrchestratorContext orchestratorContext;
+
+    public SimpleJobSubmitter(OrchestratorContext orchestratorContext) {
+        this.orchestratorContext = orchestratorContext;
+    }
+
     public GFACInstance selectGFACInstance(OrchestratorContext context) {
         return null;
     }
 
-    public boolean submitJob(GFACInstance gfac) {
-        return false;
+
+    public boolean submitJob(GFACInstance gfac, List<String> experimentIDList) {
+
+        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));
+                //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) {
+                logger.error("Error getting job related information");
+            }
+        }
     }
 }



Mime
View raw message