airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject airavata git commit: retrieving latest status
Date Tue, 22 Dec 2015 19:34:02 GMT
Repository: airavata
Updated Branches:
  refs/heads/master 5afc8cf54 -> 4a84e86af


retrieving latest status


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

Branch: refs/heads/master
Commit: 4a84e86afceb17fc46e9563bd98f948ae73d9e76
Parents: 5afc8cf
Author: Chathuri Wimalasena <chathuri@apache.org>
Authored: Tue Dec 22 14:33:57 2015 -0500
Committer: Chathuri Wimalasena <chathuri@apache.org>
Committed: Tue Dec 22 14:33:57 2015 -0500

----------------------------------------------------------------------
 .../apache/airavata/client/samples/CreateLaunchExperiment.java    | 2 +-
 .../registry/core/experiment/catalog/resources/JobResource.java   | 3 ++-
 .../core/experiment/catalog/resources/ProcessResource.java        | 3 ++-
 .../registry/core/experiment/catalog/resources/TaskResource.java  | 3 ++-
 4 files changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/4a84e86a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
index e4148f6..256e64e 100644
--- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
+++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
@@ -96,7 +96,7 @@ public class CreateLaunchExperiment {
 //        registerApplications(); // run this only the first time
 //        Map<String, String> master = airavataClient.getAllUserSSHPubKeys(token, "master");
 //        System.out.println(master.size());
-        Map<String, JobStatus> jobStatuses = airavataClient.getJobStatuses(token, "SLM4-Gamess-Comet_af8957e4-05cb-4fd4-b9b3-499ca8e67d3d");
+        Map<String, JobStatus> jobStatuses = airavataClient.getJobStatuses(token, "SLM3-QEspresso-Stampede_dc2af008-a832-4fba-ab0a-4b61fa79f5b9");
         for (String jobId : jobStatuses.keySet()){
             JobStatus jobStatus = jobStatuses.get(jobId);
             System.out.println(jobId);

http://git-wip-us.apache.org/repos/asf/airavata/blob/4a84e86a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/JobResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/JobResource.java
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/JobResource.java
index 882b5b9..01658b8 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/JobResource.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/JobResource.java
@@ -21,6 +21,7 @@
 
 package org.apache.airavata.registry.core.experiment.catalog.resources;
 
+import org.apache.airavata.model.status.JobState;
 import org.apache.airavata.registry.core.experiment.catalog.ExpCatResourceUtils;
 import org.apache.airavata.registry.core.experiment.catalog.ExperimentCatResource;
 import org.apache.airavata.registry.core.experiment.catalog.ResourceType;
@@ -373,7 +374,7 @@ public class JobResource extends AbstractExpCatResource {
             JobStatusResource max = jobStatusResources.get(0);
             for(int i=1; i<jobStatusResources.size();i++) {
                 if (jobStatusResources.get(i).getTimeOfStateChange().after(max.getTimeOfStateChange())
-                        || jobStatusResources.get(i).getTimeOfStateChange().equals(max.getTimeOfStateChange()))
{
+                        || (jobStatusResources.get(i).getTimeOfStateChange().equals(max.getTimeOfStateChange())
&& jobStatusResources.get(i).getState().equals(JobState.COMPLETE.toString()))) {
                     max = jobStatusResources.get(i);
                 }
             }

http://git-wip-us.apache.org/repos/asf/airavata/blob/4a84e86a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ProcessResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ProcessResource.java
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ProcessResource.java
index 7d75279..aed389f 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ProcessResource.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/ProcessResource.java
@@ -21,6 +21,7 @@
 
 package org.apache.airavata.registry.core.experiment.catalog.resources;
 
+import org.apache.airavata.model.status.ProcessState;
 import org.apache.airavata.registry.core.experiment.catalog.ExpCatResourceUtils;
 import org.apache.airavata.registry.core.experiment.catalog.ExperimentCatResource;
 import org.apache.airavata.registry.core.experiment.catalog.ResourceType;
@@ -644,7 +645,7 @@ public class ProcessResource extends AbstractExpCatResource {
                 Timestamp timeOfStateChange = processStatusResources.get(i).getTimeOfStateChange();
                 if (timeOfStateChange != null) {
                     if (timeOfStateChange.after(max.getTimeOfStateChange())
-                            || timeOfStateChange.equals(max.getTimeOfStateChange())) {
+                            || (timeOfStateChange.equals(max.getTimeOfStateChange()) &&
processStatusResources.get(i).getState().equals(ProcessState.COMPLETED.toString()))) {
                         max = processStatusResources.get(i);
                     }
                 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/4a84e86a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/TaskResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/TaskResource.java
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/TaskResource.java
index 0381f90..5b70763 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/TaskResource.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/TaskResource.java
@@ -21,6 +21,7 @@
 
 package org.apache.airavata.registry.core.experiment.catalog.resources;
 
+import org.apache.airavata.model.status.TaskState;
 import org.apache.airavata.registry.core.experiment.catalog.ExpCatResourceUtils;
 import org.apache.airavata.registry.core.experiment.catalog.ExperimentCatResource;
 import org.apache.airavata.registry.core.experiment.catalog.ResourceType;
@@ -404,7 +405,7 @@ public class TaskResource extends AbstractExpCatResource {
             TaskStatusResource max = taskStatusResources.get(0);
             for(int i=1; i<taskStatusResources.size();i++) {
                 if (taskStatusResources.get(i).getTimeOfStateChange().after(max.getTimeOfStateChange())
-                        || taskStatusResources.get(i).getTimeOfStateChange().equals(max.getTimeOfStateChange()))
{
+                        || (taskStatusResources.get(i).getTimeOfStateChange().equals(max.getTimeOfStateChange())
&& taskStatusResources.get(i).getState().equals(TaskState.COMPLETED.toString()) ))
{
                     max = taskStatusResources.get(i);
                 }
             }


Mime
View raw message