You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ch...@apache.org on 2015/11/03 20:48:09 UTC

[44/51] [abbrv] airavata git commit: removing process id from job status

removing process id from job status


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

Branch: refs/heads/master
Commit: b001b184aa2e5b4a00ef046417f6131b3fc35d6d
Parents: b442e0c
Author: Chathuri Wimalasena <ch...@apache.org>
Authored: Fri Oct 30 15:05:19 2015 -0400
Committer: Chathuri Wimalasena <ch...@apache.org>
Committed: Fri Oct 30 15:05:19 2015 -0400

----------------------------------------------------------------------
 .../client/samples/CreateLaunchExperiment.java       | 15 ++++++++-------
 .../core/experiment/catalog/model/JobStatus.java     | 10 ----------
 .../catalog/resources/JobStatusResource.java         |  3 +--
 .../core/experiment/catalog/resources/Utils.java     |  1 -
 .../src/main/resources/expcatalog-derby.sql          |  1 -
 .../src/main/resources/expcatalog-mysql.sql          |  1 -
 .../src/test/resources/expcatalog-derby.sql          |  1 -
 7 files changed, 9 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/b001b184/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 212c191..3f851c3 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
@@ -37,6 +37,7 @@ import org.apache.airavata.model.experiment.UserConfigurationDataModel;
 import org.apache.airavata.model.scheduling.ComputationalResourceSchedulingModel;
 import org.apache.airavata.model.security.AuthzToken;
 import org.apache.airavata.model.status.ExperimentState;
+import org.apache.airavata.model.status.JobStatus;
 import org.apache.airavata.model.util.ExperimentModelUtil;
 import org.apache.airavata.model.util.ProjectModelUtil;
 import org.apache.airavata.model.workspace.Gateway;
@@ -53,7 +54,7 @@ import java.util.Map;
 public class CreateLaunchExperiment {
 
     //FIXME: Read from a config file
-    public static final String THRIFT_SERVER_HOST = "gw119.iu.xsede.org";
+    public static final String THRIFT_SERVER_HOST = "gw56.iu.xsede.org";
     public static final int THRIFT_SERVER_PORT = 8930;
 //	public static final String THRIFT_SERVER_HOST = "gw111.iu.xsede.org";
 //	public static final int THRIFT_SERVER_PORT = 9930;
@@ -92,12 +93,12 @@ public class CreateLaunchExperiment {
         AuthzToken token = new AuthzToken("empty_token");
         System.out.println("API version is " + airavataClient.getAPIVersion(token));
 //        registerApplications(); // run this only the first time
-//        Map<String, JobStatus> jobStatuses = airavataClient.getJobStatuses(token, "SLM1-Echo-BR2_ae9573d1-cc1e-49e5-b59c-99ad10bd09ee");
-//        for (String jobId : jobStatuses.keySet()){
-//            JobStatus jobStatus = jobStatuses.get(jobId);
-//            System.out.println(jobId);
-//            System.out.println(jobStatus.getJobState().toString());
-//        }
+        Map<String, JobStatus> jobStatuses = airavataClient.getJobStatuses(token, "Cloneoftest_6a6a2a4c-7464-4caa-b30b-9b7fc08df0dc");
+        for (String jobId : jobStatuses.keySet()){
+            JobStatus jobStatus = jobStatuses.get(jobId);
+            System.out.println(jobId);
+            System.out.println(jobStatus.getJobState().toString());
+        }
 //        createAndLaunchExp();
     }
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/b001b184/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/JobStatus.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/JobStatus.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/JobStatus.java
index 0aafa35..17f95fa 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/JobStatus.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/model/JobStatus.java
@@ -33,7 +33,6 @@ public class JobStatus {
     private final static Logger logger = LoggerFactory.getLogger(JobStatus.class);
     private String statusId;
     private String jobId;
-    private String processId;
     private String taskId;
     private String state;
     private Timestamp timeOfStateChange;
@@ -60,21 +59,12 @@ public class JobStatus {
         this.jobId = jobId;
     }
 
-    @Column(name = "PROCESS_ID")
-    public String getProcessId() {
-        return processId;
-    }
-
     @Id
     @Column(name = "TASK_ID")
     public String getTaskId() {
         return taskId;
     }
 
-    public void setProcessId(String processId) {
-        this.processId = processId;
-    }
-
     @Column(name = "STATE")
     public String getState() {
         return state;

http://git-wip-us.apache.org/repos/asf/airavata/blob/b001b184/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/JobStatusResource.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/JobStatusResource.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/JobStatusResource.java
index 579219c..4cff41e 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/JobStatusResource.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/JobStatusResource.java
@@ -127,7 +127,7 @@ public class JobStatusResource extends AbstractExpCatResource {
     public void save() throws RegistryException{
         EntityManager em = null;
         try {
-            if(jobId == null || statusId == null || processId == null){
+            if(jobId == null || statusId == null || taskId == null){
                 throw new RegistryException("Does not have the job id or status id or task id");
             }
             em = ExpCatResourceUtils.getEntityManager();
@@ -153,7 +153,6 @@ public class JobStatusResource extends AbstractExpCatResource {
             }
             jobStatus.setStatusId(statusId);
             jobStatus.setJobId(jobId);
-            jobStatus.setProcessId(processId);
             jobStatus.setTaskId(taskId);
             jobStatus.setState(state);
             jobStatus.setReason(reason);

http://git-wip-us.apache.org/repos/asf/airavata/blob/b001b184/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/Utils.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/Utils.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/Utils.java
index 8a1a79e..599a9ae 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/Utils.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/resources/Utils.java
@@ -681,7 +681,6 @@ public class Utils {
         if (o != null){
             jobStatusResource.setJobId(o.getJobId());
 	        jobStatusResource.setStatusId(o.getStatusId());
-	        jobStatusResource.setProcessId(o.getProcessId());
 	        jobStatusResource.setTaskId(o.getTaskId());
 	        jobStatusResource.setState(o.getState());
             jobStatusResource.setTimeOfStateChange(o.getTimeOfStateChange());

http://git-wip-us.apache.org/repos/asf/airavata/blob/b001b184/modules/registry/registry-core/src/main/resources/expcatalog-derby.sql
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/resources/expcatalog-derby.sql b/modules/registry/registry-core/src/main/resources/expcatalog-derby.sql
index 0e91c7b..4c5e8fc 100644
--- a/modules/registry/registry-core/src/main/resources/expcatalog-derby.sql
+++ b/modules/registry/registry-core/src/main/resources/expcatalog-derby.sql
@@ -318,7 +318,6 @@ CREATE TABLE JOB (
 CREATE TABLE JOB_STATUS (
   STATUS_ID varchar(255),
   JOB_ID varchar(255),
-  PROCESS_ID varchar(255),
   TASK_ID varchar(255),
   STATE varchar(255),
   TIME_OF_STATE_CHANGE  timestamp DEFAULT '0000-00-00 00:00:00',

http://git-wip-us.apache.org/repos/asf/airavata/blob/b001b184/modules/registry/registry-core/src/main/resources/expcatalog-mysql.sql
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/resources/expcatalog-mysql.sql b/modules/registry/registry-core/src/main/resources/expcatalog-mysql.sql
index b2795c8..6ee7527 100644
--- a/modules/registry/registry-core/src/main/resources/expcatalog-mysql.sql
+++ b/modules/registry/registry-core/src/main/resources/expcatalog-mysql.sql
@@ -318,7 +318,6 @@ CREATE TABLE JOB (
 CREATE TABLE JOB_STATUS (
   STATUS_ID varchar(255),
   JOB_ID varchar(255),
-  PROCESS_ID varchar(255),
   TASK_ID varchar(255),
   STATE varchar(255),
   TIME_OF_STATE_CHANGE timestamp DEFAULT '0000-00-00 00:00:00',

http://git-wip-us.apache.org/repos/asf/airavata/blob/b001b184/modules/registry/registry-core/src/test/resources/expcatalog-derby.sql
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/test/resources/expcatalog-derby.sql b/modules/registry/registry-core/src/test/resources/expcatalog-derby.sql
index 0e91c7b..4c5e8fc 100644
--- a/modules/registry/registry-core/src/test/resources/expcatalog-derby.sql
+++ b/modules/registry/registry-core/src/test/resources/expcatalog-derby.sql
@@ -318,7 +318,6 @@ CREATE TABLE JOB (
 CREATE TABLE JOB_STATUS (
   STATUS_ID varchar(255),
   JOB_ID varchar(255),
-  PROCESS_ID varchar(255),
   TASK_ID varchar(255),
   STATE varchar(255),
   TIME_OF_STATE_CHANGE  timestamp DEFAULT '0000-00-00 00:00:00',