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-cpi to deal with taskID
Date Tue, 25 Feb 2014 22:04:23 GMT
Repository: airavata
Updated Branches:
  refs/heads/master 2a52bd743 -> ec6357671


Changing gfac-cpi to deal with taskID


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

Branch: refs/heads/master
Commit: ec63576715512a950ce359a11b64183e8d34535d
Parents: 2a52bd7
Author: lahiru <lahiru@apache.org>
Authored: Tue Feb 25 17:04:17 2014 -0500
Committer: lahiru <lahiru@apache.org>
Committed: Tue Feb 25 17:04:17 2014 -0500

----------------------------------------------------------------------
 .../src/main/java/org/apache/airavata/gfac/cpi/GFac.java    | 2 +-
 .../main/java/org/apache/airavata/gfac/cpi/GFacImpl.java    | 9 ++++++++-
 2 files changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/ec635767/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/cpi/GFac.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/cpi/GFac.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/cpi/GFac.java
index a2a4b1e..b18cdd9 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/cpi/GFac.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/cpi/GFac.java
@@ -39,7 +39,7 @@ public interface GFac {
      * @return
      * @throws org.apache.airavata.gfac.GFacException
      */
-    public JobExecutionContext submitJob(String experimentID) throws GFacException;
+    public JobExecutionContext submitJob(String experimentID,String taskID) throws GFacException;
 
     /**
      * This method has to be invoked after submitting the job and have to make sure job is
properly finished

http://git-wip-us.apache.org/repos/asf/airavata/blob/ec635767/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/cpi/GFacImpl.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/cpi/GFacImpl.java
b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/cpi/GFacImpl.java
index f2befc4..8a32afd 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/cpi/GFacImpl.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/cpi/GFacImpl.java
@@ -109,8 +109,13 @@ public class GFacImpl implements GFac {
      * @return
      * @throws GFacException
      */
-    public JobExecutionContext submitJob(String experimentID) throws GFacException {
+    public JobExecutionContext submitJob(String experimentID,String taskID) throws GFacException
{
         ConfigurationData configurationData = (ConfigurationData) registry.get(DataType.EXPERIMENT_CONFIGURATION_DATA,
experimentID);
+        // this is wear our new model and old model is mapping (so serviceName in ExperimentData
and service name in ServiceDescriptor
+        // has to be same.
+
+        // 1. Get the Task from the task ID and construct the Job object and save it in to
registry
+        // 2. Add another property to jobExecutionContext and read them inside the provider
and use it.
         String serviceName = configurationData.getApplicationId();
         JobExecutionContext jobExecutionContext = null;
         if (serviceName == null) {
@@ -153,6 +158,8 @@ public class GFacImpl implements GFac {
             jobExecutionContext.setExperimentID(experimentID);
 
             addSecurityContext(hostDescription, configurationProperties, jobExecutionContext);
+
+
             submitJob(jobExecutionContext);
         } catch (Exception e) {
             log.error("Error inovoking the job with experiment ID: " + experimentID);


Mime
View raw message