airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject [4/4] git commit: update local providers - AIRAVATA-1061
Date Thu, 06 Mar 2014 17:15:29 GMT
update local providers - AIRAVATA-1061


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

Branch: refs/heads/master
Commit: 880003b67264c434330499a78893823340c32766
Parents: 28f0b42
Author: chathuri <chathuri@apache.org>
Authored: Thu Mar 6 12:15:10 2014 -0500
Committer: chathuri <chathuri@apache.org>
Committed: Thu Mar 6 12:15:10 2014 -0500

----------------------------------------------------------------------
 .../apache/airavata/gfac/provider/impl/LocalProvider.java   | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/880003b6/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/LocalProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/LocalProvider.java
b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/LocalProvider.java
index d9a8383..3109080 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/LocalProvider.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/LocalProvider.java
@@ -41,6 +41,7 @@ import org.apache.airavata.gfac.utils.GFacUtils;
 import org.apache.airavata.gfac.utils.InputStreamToFileWriter;
 import org.apache.airavata.gfac.utils.InputUtils;
 import org.apache.airavata.gfac.utils.OutputUtils;
+import org.apache.airavata.model.workspace.experiment.JobDetails;
 import org.apache.airavata.model.workspace.experiment.JobState;
 import org.apache.airavata.registry.api.workflow.ApplicationJob;
 import org.apache.airavata.registry.api.workflow.ApplicationJob.ApplicationJobStatus;
@@ -126,9 +127,11 @@ public class LocalProvider extends AbstractProvider implements GFacProvider{
         jobExecutionContext.getNotifier().publish(new StartExecutionEvent());
          ApplicationDeploymentDescriptionType app = jobExecutionContext.
                  getApplicationContext().getApplicationDeploymentDescription().getType();
-
+        JobDetails jobDetails = new JobDetails();
         try {
         	jobId= jobExecutionContext.getTaskData().getTaskID();
+            jobDetails.setJobID(jobId);
+            jobExecutionContext.setJobDetails(jobDetails);
             details.setJobID(jobId);
             GFacUtils.saveJobStatus(details, JobState.SETUP, jobExecutionContext.getTaskData().getTaskID());
         	// running cmd
@@ -147,11 +150,11 @@ public class LocalProvider extends AbstractProvider implements GFacProvider{
             standardErrorWriter.setDaemon(true);
             standardOutWriter.start();
             standardErrorWriter.start();
-//            GFacUtils.updateApplicationJobStatus(jobExecutionContext,jobId, ApplicationJobStatus.EXECUTING);
+            GFacUtils.updateJobStatus(jobDetails, JobState.ACTIVE);
             // wait for the process (application) to finish executing
             int returnValue = process.waitFor();
             //todo fix how to incoperate orchestrator with gfac
-//            GFacUtils.updateApplicationJobStatus(jobExecutionContext,jobId, ApplicationJobStatus.FINALIZE);
+            GFacUtils.updateJobStatus(jobDetails, JobState.COMPLETE);
 
             // make sure other two threads are done
             standardOutWriter.join();


Mime
View raw message