airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lah...@apache.org
Subject git commit: Changing gfac framework to coop with new gfac service
Date Wed, 21 May 2014 18:15:00 GMT
Repository: airavata
Updated Branches:
  refs/heads/master b04cbe950 -> 009ee0d7b


Changing gfac framework to coop with new gfac service


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

Branch: refs/heads/master
Commit: 009ee0d7bb86c9757575b973c213fae760a4ae99
Parents: b04cbe9
Author: lahiru <lahiru@apache.org>
Authored: Wed May 21 14:14:42 2014 -0400
Committer: lahiru <lahiru@apache.org>
Committed: Wed May 21 14:14:42 2014 -0400

----------------------------------------------------------------------
 .../main/java/org/apache/airavata/gfac/core/cpi/GFac.java |  4 ++--
 .../java/org/apache/airavata/gfac/core/cpi/GFacImpl.java  |  9 ++++-----
 modules/gfac/pom.xml                                      | 10 ++++++----
 .../orchestrator/core/impl/EmbeddedGFACJobSubmitter.java  |  6 ++----
 .../airavata/orchestrator/core/job/JobSubmitter.java      |  4 ++--
 .../apache/airavata/orchestrator/cpi/Orchestrator.java    |  4 ++--
 .../orchestrator/cpi/impl/SimpleOrchestratorImpl.java     |  6 ++----
 7 files changed, 20 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/009ee0d7/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/GFac.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/GFac.java
b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/GFac.java
index 60e499f..caf9575 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/GFac.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/GFac.java
@@ -34,9 +34,9 @@ public interface GFac {
      * And update the registry occordingly, so the users can query the database to retrieve
status and output from Registry
      *
      * @param experimentID
-     * @return
+     * @return boolean Successful acceptence of the jobExecution returns a true value
      * @throws org.apache.airavata.gfac.GFacException
      */
-    public JobExecutionContext submitJob(String experimentID,String taskID) throws GFacException;
+    public boolean submitJob(String experimentID,String taskID) throws GFacException;
 
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/009ee0d7/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/GFacImpl.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/GFacImpl.java
b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/GFacImpl.java
index 0ecd4d7..40e1456 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/GFacImpl.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/cpi/GFacImpl.java
@@ -189,12 +189,11 @@ public class GFacImpl implements GFac {
      * @return
      * @throws GFacException
      */
-    public JobExecutionContext submitJob(String experimentID,String taskID) throws GFacException
{
+    public boolean submitJob(String experimentID,String taskID) throws GFacException {
         JobExecutionContext jobExecutionContext = null;
         try {
             jobExecutionContext = createJEC(experimentID, taskID);
-
-            return  submitJob(jobExecutionContext);
+            return submitJob(jobExecutionContext);
         } catch (Exception e) {
             log.error("Error inovoking the job with experiment ID: " + experimentID);
             throw new GFacException(e);
@@ -269,7 +268,7 @@ public class GFacImpl implements GFac {
         return jobExecutionContext;
     }
 
-    public JobExecutionContext submitJob(JobExecutionContext jobExecutionContext) throws
GFacException {
+    public boolean submitJob(JobExecutionContext jobExecutionContext) throws GFacException
{
         // We need to check whether this job is submitted as a part of a large workflow.
If yes,
         // we need to setup workflow tracking listerner.
         String workflowInstanceID = null;
@@ -281,7 +280,7 @@ public class GFacImpl implements GFac {
         // Register log event listener. This is required in all scenarios.
         jobExecutionContext.getNotificationService().registerListener(new LoggingListener());
         schedule(jobExecutionContext);
-        return jobExecutionContext;
+        return true;
     }
 
     private void schedule(JobExecutionContext jobExecutionContext) throws GFacException {

http://git-wip-us.apache.org/repos/asf/airavata/blob/009ee0d7/modules/gfac/pom.xml
----------------------------------------------------------------------
diff --git a/modules/gfac/pom.xml b/modules/gfac/pom.xml
index 9e1dcc0..fd68c77 100644
--- a/modules/gfac/pom.xml
+++ b/modules/gfac/pom.xml
@@ -8,7 +8,8 @@
     ANY ~ KIND, either express or implied. See the License for the specific language governing
permissions and limitations under
     the License. -->
 
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 
     <parent>
         <groupId>org.apache.airavata</groupId>
@@ -35,10 +36,11 @@
                 <module>gfac-ssh</module>
                 <module>gfac-local</module>
                 <module>gfac-hadoop</module>
-		<module>gfac-gram</module>
+                <module>gfac-gram</module>
                 <module>gfac-gsissh</module>
-		<module>gfac-bes</module>
-		<module>gfac-monitor</module>
+                <module>gfac-bes</module>
+                <module>gfac-monitor</module>
+                <module>airavata-gfac-service</module>
             </modules>
         </profile>
     </profiles>

http://git-wip-us.apache.org/repos/asf/airavata/blob/009ee0d7/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/EmbeddedGFACJobSubmitter.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/EmbeddedGFACJobSubmitter.java
b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/EmbeddedGFACJobSubmitter.java
index 90b07a2..ed69226 100644
--- a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/EmbeddedGFACJobSubmitter.java
+++ b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/impl/EmbeddedGFACJobSubmitter.java
@@ -55,16 +55,14 @@ public class EmbeddedGFACJobSubmitter implements JobSubmitter {
     }
 
 
-    public JobExecutionContext submit(String experimentID, String taskID) throws OrchestratorException
{
-        JobExecutionContext jobExecutionContext;
+    public boolean submit(String experimentID, String taskID) throws OrchestratorException
{
         try {
-             jobExecutionContext = gfac.submitJob(experimentID, taskID);
+             return gfac.submitJob(experimentID, taskID);
         } catch (Exception e) {
             String error = "Error launching the job : " + experimentID;
             logger.error(error);
             throw new OrchestratorException(error);
         }
-        return jobExecutionContext;
     }
 
     public GFac getGfac() {

http://git-wip-us.apache.org/repos/asf/airavata/blob/009ee0d7/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/job/JobSubmitter.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/job/JobSubmitter.java
b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/job/JobSubmitter.java
index 1fd5269..5891dff 100644
--- a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/job/JobSubmitter.java
+++ b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/job/JobSubmitter.java
@@ -49,7 +49,7 @@ public interface JobSubmitter {
      * just get the request data and do the submission
      * @param experimentID experimentID cannot be null
      * @param taskID taskID cannot be null
-     * @return JobExecutionContext return the jobExecutionContext from GFac
+     * @return boolean return the submit status
      */
-    JobExecutionContext submit(String experimentID, String taskID) throws OrchestratorException;
+    boolean submit(String experimentID, String taskID) throws OrchestratorException;
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/009ee0d7/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/Orchestrator.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/Orchestrator.java
b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/Orchestrator.java
index 79ea674..24a6313 100644
--- a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/Orchestrator.java
+++ b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/Orchestrator.java
@@ -53,10 +53,10 @@ public interface Orchestrator {
      * We just have to give the experimentID
      *
      * @param experiment
-     * @return jobID
+     * @return launchExperiment status
      * @throws OrchestratorException
      */
-    String launchExperiment(Experiment experiment, WorkflowNodeDetails workflowNodeDetail,
+    boolean launchExperiment(Experiment experiment, WorkflowNodeDetails workflowNodeDetail,
                             TaskDetails taskID) throws OrchestratorException;
 
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/009ee0d7/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java
b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java
index 27df710..afca240 100644
--- a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java
+++ b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java
@@ -72,16 +72,14 @@ public class SimpleOrchestratorImpl extends AbstractOrchestrator{
         }
     }
 
-    public String launchExperiment(Experiment experiment, WorkflowNodeDetails workflowNode,
TaskDetails task) throws OrchestratorException {
+    public boolean launchExperiment(Experiment experiment, WorkflowNodeDetails workflowNode,
TaskDetails task) throws OrchestratorException {
         // we give higher priority to userExperimentID
-        //todo support multiple validators
         String experimentId = experiment.getExperimentID();
         String taskId = task.getTaskID();
         // creating monitorID to register with monitoring queue
         // this is a special case because amqp has to be in place before submitting the job
         try {
-            JobExecutionContext jobExecutionContext = jobSubmitter.submit(experimentId, taskId);
-            return jobExecutionContext.getJobDetails().getJobID();
+            return jobSubmitter.submit(experimentId, taskId);
         } catch (Exception e) {
             throw new OrchestratorException("Error launching the job", e);
         }


Mime
View raw message