You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sc...@apache.org on 2016/08/31 19:14:14 UTC
[06/10] airavata git commit: adding job and task database models
adding job and task database models
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/eee49d36
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/eee49d36
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/eee49d36
Branch: refs/heads/develop
Commit: eee49d36c2ea2e9ab379c2ebfb2bd51a0ab647e6
Parents: 171c042
Author: scnakandala <su...@gmail.com>
Authored: Mon Aug 29 15:13:53 2016 -0400
Committer: scnakandala <su...@gmail.com>
Committed: Mon Aug 29 15:13:53 2016 -0400
----------------------------------------------------------------------
.../ComputeResourceSchedulingEntity.java | 2 +-
.../entities/expcatalog/ExperimentEntity.java | 4 +-
.../expcatalog/ExperimentErrorEntity.java | 2 +-
.../expcatalog/ExperimentInputEntity.java | 2 +-
.../expcatalog/ExperimentOutputEntity.java | 2 +-
.../expcatalog/ExperimentStatusEntity.java | 2 +-
.../core/entities/expcatalog/JobEntity.java | 165 +++++++++++++++++++
.../entities/expcatalog/JobStatusEntity.java | 83 ++++++++++
.../core/entities/expcatalog/JobStatusPK.java | 74 +++++++++
.../core/entities/expcatalog/ProcessEntity.java | 12 +-
.../entities/expcatalog/ProcessErrorEntity.java | 4 +-
.../entities/expcatalog/ProcessInputEntity.java | 2 +-
.../expcatalog/ProcessOutputEntity.java | 2 +-
.../ProcessResourceSchedulingEntity.java | 2 +-
.../expcatalog/ProcessStatusEntity.java | 2 +-
.../core/entities/expcatalog/TaskEntity.java | 147 +++++++++++++++++
.../entities/expcatalog/TaskErrorEntity.java | 118 +++++++++++++
.../core/entities/expcatalog/TaskErrorPK.java | 75 +++++++++
.../entities/expcatalog/TaskStatusEntity.java | 83 ++++++++++
.../core/entities/expcatalog/TaskStatusPK.java | 74 +++++++++
.../expcatalog/UserConfigurationEntity.java | 2 +-
.../workspacecatalog/GatewayEntity.java | 2 +-
.../workspacecatalog/NSFDemographicsEntity.java | 2 +-
.../workspacecatalog/NotificationEntity.java | 2 +-
.../workspacecatalog/ProjectEntity.java | 2 +-
.../workspacecatalog/UserProfileEntity.java | 2 +-
.../expcatalog/ExperimentRepository.java | 9 +
.../src/main/resources/META-INF/persistence.xml | 5 +
.../src/main/resources/experiment_catalog.sql | 132 ++++++++++-----
.../src/main/resources/workspace_catalog.sql | 48 +++---
30 files changed, 982 insertions(+), 81 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/eee49d36/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ComputeResourceSchedulingEntity.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ComputeResourceSchedulingEntity.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ComputeResourceSchedulingEntity.java
index 76eb5ea..bfbb3e2 100644
--- a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ComputeResourceSchedulingEntity.java
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ComputeResourceSchedulingEntity.java
@@ -23,7 +23,7 @@ package org.apache.airavata.registry.core.entities.expcatalog;
import javax.persistence.*;
@Entity
-@Table(name = "COMPUTE_RESOURCE_SCHEDULING")
+@Table(name = "EXPCAT_COMPUTE_RESOURCE_SCHEDULING")
public class ComputeResourceSchedulingEntity {
private String experimentId;
private String resourceHostId;
http://git-wip-us.apache.org/repos/asf/airavata/blob/eee49d36/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentEntity.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentEntity.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentEntity.java
index a0686f8..e7ea3f6 100644
--- a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentEntity.java
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentEntity.java
@@ -24,7 +24,7 @@ import javax.persistence.*;
import java.util.List;
@Entity
-@Table(name = "EXPERIMENT")
+@Table(name = "EXPCAT_EXPERIMENT")
public class ExperimentEntity {
public String experimentId;
public String projectId;
@@ -159,7 +159,7 @@ public class ExperimentEntity {
}
@ElementCollection
- @CollectionTable(name="EXPERIMENT_EMAIL", joinColumns = @JoinColumn(name="EXPERIMENT_ID"))
+ @CollectionTable(name="EXPCAT_EXPERIMENT_EMAIL", joinColumns = @JoinColumn(name="EXPERIMENT_ID"))
public List<String> getEmailAddresses() {
return emailAddresses;
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/eee49d36/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentErrorEntity.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentErrorEntity.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentErrorEntity.java
index 374a156..37df525 100644
--- a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentErrorEntity.java
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentErrorEntity.java
@@ -24,7 +24,7 @@ import javax.persistence.*;
import java.util.List;
@Entity
-@Table(name = "EXPERIMENT_ERROR")
+@Table(name = "EXPCAT_EXPERIMENT_ERROR")
@IdClass(ExperimentErrorPK.class)
public class ExperimentErrorEntity {
private String errorId;
http://git-wip-us.apache.org/repos/asf/airavata/blob/eee49d36/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentInputEntity.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentInputEntity.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentInputEntity.java
index 7850c17..4a9b2c0 100644
--- a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentInputEntity.java
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentInputEntity.java
@@ -23,7 +23,7 @@ package org.apache.airavata.registry.core.entities.expcatalog;
import javax.persistence.*;
@Entity
-@Table(name = "EXPERIMENT_INPUT")
+@Table(name = "EXPCAT_EXPERIMENT_INPUT")
@IdClass(ExperimentInputPK.class)
public class ExperimentInputEntity {
private String experimentId;
http://git-wip-us.apache.org/repos/asf/airavata/blob/eee49d36/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentOutputEntity.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentOutputEntity.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentOutputEntity.java
index 891cf79..871fcd7 100644
--- a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentOutputEntity.java
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentOutputEntity.java
@@ -23,7 +23,7 @@ package org.apache.airavata.registry.core.entities.expcatalog;
import javax.persistence.*;
@Entity
-@Table(name = "EXPERIMENT_OUTPUT")
+@Table(name = "EXPCAT_EXPERIMENT_OUTPUT")
@IdClass(ExperimentOutputPK.class)
public class ExperimentOutputEntity {
private String experimentId;
http://git-wip-us.apache.org/repos/asf/airavata/blob/eee49d36/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentStatusEntity.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentStatusEntity.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentStatusEntity.java
index 48b822f..7a73e78 100644
--- a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentStatusEntity.java
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ExperimentStatusEntity.java
@@ -23,7 +23,7 @@ package org.apache.airavata.registry.core.entities.expcatalog;
import javax.persistence.*;
@Entity
-@Table(name = "EXPERIMENT_STATUS")
+@Table(name = "EXPCAT_EXPERIMENT_STATUS")
@IdClass(ExperimentStatusPK.class)
public class ExperimentStatusEntity {
private String experimentId;
http://git-wip-us.apache.org/repos/asf/airavata/blob/eee49d36/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/JobEntity.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/JobEntity.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/JobEntity.java
new file mode 100644
index 0000000..a66295e
--- /dev/null
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/JobEntity.java
@@ -0,0 +1,165 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.registry.core.entities.expcatalog;
+
+import javax.persistence.*;
+import java.util.List;
+
+@Entity
+@Table(name = "EXPCAT_JOB")
+public class JobEntity {
+ private String jobId;
+ private String taskId;
+ private String processId;
+ private String jobDescription;
+ private long creationTime;
+ private String computeResourceConsumed;
+ private String jobName;
+ private String workingDir;
+ private String stdOut;
+ private String stdErr;
+ private int exitCode;
+
+ private List<JobStatusEntity> jobStatus;
+
+ private TaskEntity task;
+
+ @Id
+ @Column(name = "JOB_ID")
+ public String getJobId() {
+ return jobId;
+ }
+
+ public void setJobId(String jobId) {
+ this.jobId = jobId;
+ }
+
+ @Column(name = "TASK_ID")
+ public String getTaskId() {
+ return taskId;
+ }
+
+ public void setTaskId(String taskId) {
+ this.taskId = taskId;
+ }
+
+ @Column(name = "PROCESS_ID")
+ public String getProcessId() {
+ return processId;
+ }
+
+ public void setProcessId(String processId) {
+ this.processId = processId;
+ }
+
+ @Column(name = "JOB_DESCRIPTION")
+ public String getJobDescription() {
+ return jobDescription;
+ }
+
+ public void setJobDescription(String jobDescription) {
+ this.jobDescription = jobDescription;
+ }
+
+ @Column(name = "CREATION_TIME")
+ public long getCreationTime() {
+ return creationTime;
+ }
+
+ public void setCreationTime(long creationTime) {
+ this.creationTime = creationTime;
+ }
+
+ @Column(name = "COMPUTE_RESOURCE_CONSUMED")
+ public String getComputeResourceConsumed() {
+ return computeResourceConsumed;
+ }
+
+ public void setComputeResourceConsumed(String computeResourceConsumed) {
+ this.computeResourceConsumed = computeResourceConsumed;
+ }
+
+ @Column(name = "JOB_NAME")
+ public String getJobName() {
+ return jobName;
+ }
+
+ public void setJobName(String jobName) {
+ this.jobName = jobName;
+ }
+
+ @Column(name = "WORKING_DIR")
+ public String getWorkingDir() {
+ return workingDir;
+ }
+
+ public void setWorkingDir(String workingDir) {
+ this.workingDir = workingDir;
+ }
+
+ @Lob
+ @Column(name = "STDOUT")
+ public String getStdOut() {
+ return stdOut;
+ }
+
+ public void setStdOut(String stdOut) {
+ this.stdOut = stdOut;
+ }
+
+ @Lob
+ @Column(name = "STDERR")
+ public String getStdErr() {
+ return stdErr;
+ }
+
+ public void setStdErr(String stdErr) {
+ this.stdErr = stdErr;
+ }
+
+ @Column(name = "EXIT_CODE")
+ public int getExitCode() {
+ return exitCode;
+ }
+
+ public void setExitCode(int exitCode) {
+ this.exitCode = exitCode;
+ }
+
+ @OneToMany(targetEntity = JobStatusEntity.class, cascade = CascadeType.ALL, mappedBy = "job")
+ public List<JobStatusEntity> getJobStatus() {
+ return jobStatus;
+ }
+
+ public void setJobStatus(List<JobStatusEntity> jobStatus) {
+ this.jobStatus = jobStatus;
+ }
+
+ @ManyToOne(targetEntity = TaskEntity.class, cascade = CascadeType.ALL, fetch = FetchType.LAZY)
+ @JoinColumn(name = "TASK_ID", referencedColumnName = "TASK_ID")
+ public TaskEntity getTask() {
+ return task;
+ }
+
+ public void setTask(TaskEntity task) {
+ this.task = task;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/eee49d36/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/JobStatusEntity.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/JobStatusEntity.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/JobStatusEntity.java
new file mode 100644
index 0000000..bcc902b
--- /dev/null
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/JobStatusEntity.java
@@ -0,0 +1,83 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.registry.core.entities.expcatalog;
+
+import javax.persistence.*;
+
+@Entity
+@Table(name = "EXPCAT_JOB_STATUS")
+@IdClass(JobStatusPK.class)
+public class JobStatusEntity {
+ private String jobId;
+ private String state;
+ private long timeOfStateChange;
+ private String reason;
+
+ private JobEntity job;
+
+ @Id
+ @Column(name = "JOB_ID")
+ public String getJobId() {
+ return jobId;
+ }
+
+ public void setJobId(String jobId) {
+ this.jobId = jobId;
+ }
+
+ @Id
+ @Column(name = "STATE")
+ public String getState() {
+ return state;
+ }
+
+ public void setState(String state) {
+ this.state = state;
+ }
+
+ @Column(name = "TIME_OF_STATE_CHANGE")
+ public long getTimeOfStateChange() {
+ return timeOfStateChange;
+ }
+
+ public void setTimeOfStateChange(long timeOfStateChange) {
+ this.timeOfStateChange = timeOfStateChange;
+ }
+
+ @Column(name = "REASON")
+ public String getReason() {
+ return reason;
+ }
+
+ public void setReason(String reason) {
+ this.reason = reason;
+ }
+
+ @ManyToOne(targetEntity = JobEntity.class, cascade = CascadeType.ALL, fetch = FetchType.LAZY)
+ @JoinColumn(name = "JOB_ID", referencedColumnName = "JOB_ID")
+ public JobEntity getJob() {
+ return job;
+ }
+
+ public void setJob(JobEntity job) {
+ this.job = job;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/eee49d36/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/JobStatusPK.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/JobStatusPK.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/JobStatusPK.java
new file mode 100644
index 0000000..fa8964f
--- /dev/null
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/JobStatusPK.java
@@ -0,0 +1,74 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.registry.core.entities.expcatalog;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.Column;
+import javax.persistence.Id;
+import java.io.Serializable;
+
+public class JobStatusPK implements Serializable {
+ private final static Logger logger = LoggerFactory.getLogger(JobStatusPK.class);
+ private String state;
+ private String jobId;
+
+ @Id
+ @Column(name = "STATUS_ID")
+ public String getState() {
+ return state;
+ }
+
+ public void setState(String state) {
+ this.state = state;
+ }
+
+ @Id
+ @Column(name = "JOB_ID")
+ public String getJobId() {
+ return jobId;
+ }
+
+ public void setJobId(String jobId) {
+ this.jobId = jobId;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ JobStatusPK that = (JobStatusPK) o;
+
+ if (getState() != null ? !getState().equals(that.getState()) : that.getState() != null) return false;
+ if (getJobId() != null ? !getJobId().equals(that.getJobId()) : that.getJobId() != null) return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = getState() != null ? getState().hashCode() : 0;
+ result = 31 * result + (getJobId() != null ? getJobId().hashCode() : 0);
+ return result;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/eee49d36/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ProcessEntity.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ProcessEntity.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ProcessEntity.java
index d7c6cca..109041e 100644
--- a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ProcessEntity.java
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ProcessEntity.java
@@ -25,7 +25,7 @@ import javax.persistence.*;
import java.util.List;
@Entity
-@Table(name = "PROCESS")
+@Table(name = "EXPCAT_PROCESS")
public class ProcessEntity {
private String processId;
private String experimentId;
@@ -50,6 +50,7 @@ public class ProcessEntity {
private List<ProcessInputEntity> processInputs;
private List<ProcessOutputEntity> processOutputs;
private ProcessResourceSchedulingEntity processResourceSchedule;
+ private List<TaskEntity> tasks;
private ExperimentEntity experiment;
@@ -254,6 +255,15 @@ public class ProcessEntity {
this.processResourceSchedule = proceeResourceSchedule;
}
+ @OneToMany(targetEntity = TaskEntity.class, cascade = CascadeType.ALL, mappedBy = "process")
+ public List<TaskEntity> getTasks() {
+ return tasks;
+ }
+
+ public void setTasks(List<TaskEntity> tasks) {
+ this.tasks = tasks;
+ }
+
@ManyToOne(targetEntity = ExperimentEntity.class, cascade = CascadeType.ALL, fetch = FetchType.LAZY)
@JoinColumn(name = "EXPERIMENT_ID", referencedColumnName = "EXPERIMENT_ID")
public ExperimentEntity getExperiment() {
http://git-wip-us.apache.org/repos/asf/airavata/blob/eee49d36/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ProcessErrorEntity.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ProcessErrorEntity.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ProcessErrorEntity.java
index bae331f..60ad9b2 100644
--- a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ProcessErrorEntity.java
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ProcessErrorEntity.java
@@ -24,7 +24,7 @@ import javax.persistence.*;
import java.util.List;
@Entity
-@Table(name = "PROCESS_ERROR")
+@Table(name = "EXPCAT_PROCESS_ERROR")
@IdClass(ProcessErrorPK.class)
public class ProcessErrorEntity {
private String errorId;
@@ -96,7 +96,7 @@ public class ProcessErrorEntity {
@ElementCollection
- @CollectionTable(name="EXPERIMENT_ERROR_ROOT_CAUSE_ERROR_ID", joinColumns = @JoinColumn(name="ERROR_ID"))
+ @CollectionTable(name="EXPCAT_EXPERIMENT_ERROR_ROOT_CAUSE_ERROR_ID", joinColumns = @JoinColumn(name="ERROR_ID"))
public List<String> getRootCauseErrorIdList() {
return rootCauseErrorIdList;
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/eee49d36/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ProcessInputEntity.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ProcessInputEntity.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ProcessInputEntity.java
index a63ff37..850c4a9 100644
--- a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ProcessInputEntity.java
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ProcessInputEntity.java
@@ -23,7 +23,7 @@ package org.apache.airavata.registry.core.entities.expcatalog;
import javax.persistence.*;
@Entity
-@Table(name = "PROCESS_INPUT")
+@Table(name = "EXPCAT_PROCESS_INPUT")
@IdClass(ProcessInputPK.class)
public class ProcessInputEntity {
private String processId;
http://git-wip-us.apache.org/repos/asf/airavata/blob/eee49d36/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ProcessOutputEntity.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ProcessOutputEntity.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ProcessOutputEntity.java
index 06181bc..4226f7a 100644
--- a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ProcessOutputEntity.java
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ProcessOutputEntity.java
@@ -23,7 +23,7 @@ package org.apache.airavata.registry.core.entities.expcatalog;
import javax.persistence.*;
@Entity
-@Table(name = "PROCESS_OUTPUT")
+@Table(name = "EXPCAT_PROCESS_OUTPUT")
@IdClass(ProcessOutputPK.class)
public class ProcessOutputEntity {
private String processId;
http://git-wip-us.apache.org/repos/asf/airavata/blob/eee49d36/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ProcessResourceSchedulingEntity.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ProcessResourceSchedulingEntity.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ProcessResourceSchedulingEntity.java
index 11f167d..3a64f42 100644
--- a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ProcessResourceSchedulingEntity.java
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ProcessResourceSchedulingEntity.java
@@ -23,7 +23,7 @@ package org.apache.airavata.registry.core.entities.expcatalog;
import javax.persistence.*;
@Entity
-@Table(name = "PROCESS_RESOURCE_SCHEDULING")
+@Table(name = "EXPCAT_PROCESS_RESOURCE_SCHEDULING")
public class ProcessResourceSchedulingEntity {
private String processId;
private String resourceHostId;
http://git-wip-us.apache.org/repos/asf/airavata/blob/eee49d36/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ProcessStatusEntity.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ProcessStatusEntity.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ProcessStatusEntity.java
index ea816b5..7a3c30e 100644
--- a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ProcessStatusEntity.java
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/ProcessStatusEntity.java
@@ -23,7 +23,7 @@ package org.apache.airavata.registry.core.entities.expcatalog;
import javax.persistence.*;
@Entity
-@Table(name = "PROCESS_STATUS")
+@Table(name = "EXPCAT_PROCESS_STATUS")
@IdClass(ProcessStatusPK.class)
public class ProcessStatusEntity {
private String processId;
http://git-wip-us.apache.org/repos/asf/airavata/blob/eee49d36/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/TaskEntity.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/TaskEntity.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/TaskEntity.java
new file mode 100644
index 0000000..f01fa10
--- /dev/null
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/TaskEntity.java
@@ -0,0 +1,147 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.registry.core.entities.expcatalog;
+
+import org.apache.airavata.model.task.TaskTypes;
+
+import javax.persistence.*;
+import java.nio.ByteBuffer;
+import java.util.List;
+
+@Entity
+@Table(name = "EXPCAT_TASK")
+public class TaskEntity {
+ private String taskId;
+ private TaskTypes taskType;
+ private String parentProcessId;
+ private long creationTime;
+ private long lastUpdateTime;
+ private String taskDetail;
+ private ByteBuffer subTaskModel;
+
+ private List<TaskStatusEntity> taskStatus;
+ private List<TaskErrorEntity> taskError;
+ private List<JobEntity> jobs;
+
+ private ProcessEntity process;
+
+ @Id
+ @Column(name = "TASK_ID")
+ public String getTaskId() {
+ return taskId;
+ }
+
+ public void setTaskId(String taskId) {
+ this.taskId = taskId;
+ }
+
+ @Column(name = "TASK_TYPE")
+ public TaskTypes getTaskType() {
+ return taskType;
+ }
+
+ public void setTaskType(TaskTypes taskType) {
+ this.taskType = taskType;
+ }
+
+ @Column(name = "PARENT_PROCESS_ID")
+ public String getParentProcessId() {
+ return parentProcessId;
+ }
+
+ public void setParentProcessId(String parentProcessId) {
+ this.parentProcessId = parentProcessId;
+ }
+
+ @Column(name = "CREATION_TIME")
+ public long getCreationTime() {
+ return creationTime;
+ }
+
+ public void setCreationTime(long creationTime) {
+ this.creationTime = creationTime;
+ }
+
+ @Column(name = "LAST_UPDATE_TIME")
+ public long getLastUpdateTime() {
+ return lastUpdateTime;
+ }
+
+ public void setLastUpdateTime(long lastUpdateTime) {
+ this.lastUpdateTime = lastUpdateTime;
+ }
+
+ @Column(name = "TASK_DETAIL")
+ public String getTaskDetail() {
+ return taskDetail;
+ }
+
+ public void setTaskDetail(String taskDetail) {
+ this.taskDetail = taskDetail;
+ }
+
+ @Lob
+ @Column(name = "SUB_TASK_MODEL")
+ public ByteBuffer getSubTaskModel() {
+ return subTaskModel;
+ }
+
+ public void setSubTaskModel(ByteBuffer subTaskModel) {
+ this.subTaskModel = subTaskModel;
+ }
+
+ @OneToMany(targetEntity = TaskStatusEntity.class, cascade = CascadeType.ALL, mappedBy = "task")
+ public List<TaskStatusEntity> getTaskStatus() {
+ return taskStatus;
+ }
+
+ public void setTaskStatus(List<TaskStatusEntity> taskStatus) {
+ this.taskStatus = taskStatus;
+ }
+
+ @OneToMany(targetEntity = TaskErrorEntity.class, cascade = CascadeType.ALL, mappedBy = "task")
+ public List<TaskErrorEntity> getTaskError() {
+ return taskError;
+ }
+
+ public void setTaskError(List<TaskErrorEntity> taskError) {
+ this.taskError = taskError;
+ }
+
+ @OneToMany(targetEntity = JobEntity.class, cascade = CascadeType.ALL, mappedBy = "task")
+ public List<JobEntity> getJobs() {
+ return jobs;
+ }
+
+ public void setJobs(List<JobEntity> jobs) {
+ this.jobs = jobs;
+ }
+
+ @ManyToOne(targetEntity = ProcessEntity.class, cascade = CascadeType.ALL, fetch = FetchType.LAZY)
+ @JoinColumn(name = "PARENT_PROCESS_ID", referencedColumnName = "PROCESS_ID")
+ public ProcessEntity getProcess() {
+ return process;
+ }
+
+ public void setProcess(ProcessEntity process) {
+ this.process = process;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/eee49d36/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/TaskErrorEntity.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/TaskErrorEntity.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/TaskErrorEntity.java
new file mode 100644
index 0000000..d269ab7
--- /dev/null
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/TaskErrorEntity.java
@@ -0,0 +1,118 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.registry.core.entities.expcatalog;
+
+import javax.persistence.*;
+import java.util.List;
+
+@Entity
+@Table(name = "EXPCAT_TASK_ERROR")
+@IdClass(TaskErrorPK.class)
+public class TaskErrorEntity {
+ private String errorId;
+ private String taskId;
+ private long creationTime;
+ private String actualErrorMessage;
+ private String userFriendlyMessage;
+ private boolean transientOrPersistent;
+ private List<String> rootCauseErrorIdList;
+
+ private TaskEntity task;
+
+ @Id
+ @Column(name = "ERROR_ID")
+ public String getErrorId() {
+ return errorId;
+ }
+
+ public void setErrorId(String errorId) {
+ this.errorId = errorId;
+ }
+
+ @Id
+ @Column(name = "TASK_ID")
+ public String getTaskId() {
+ return taskId;
+ }
+
+ public void setTaskId(String taskId) {
+ this.taskId = taskId;
+ }
+
+ @Column(name = "CREATION_TIME")
+ public long getCreationTime() {
+ return creationTime;
+ }
+
+ public void setCreationTime(long creationTime) {
+ this.creationTime = creationTime;
+ }
+
+ @Column(name = "ACTUAL_ERROR_MESSAGE")
+ public String getActualErrorMessage() {
+ return actualErrorMessage;
+ }
+
+ public void setActualErrorMessage(String actualErrorMessage) {
+ this.actualErrorMessage = actualErrorMessage;
+ }
+
+ @Column(name = "USER_FRIENDLY_MESSAGE")
+ public String getUserFriendlyMessage() {
+ return userFriendlyMessage;
+ }
+
+ public void setUserFriendlyMessage(String userFriendlyMessage) {
+ this.userFriendlyMessage = userFriendlyMessage;
+ }
+
+
+ @Column(name = "TRANSIENT_OR_PERSISTENT")
+ public boolean isTransientOrPersistent() {
+ return transientOrPersistent;
+ }
+
+ public void setTransientOrPersistent(boolean transientOrPersistent) {
+ this.transientOrPersistent = transientOrPersistent;
+ }
+
+
+ @ElementCollection
+ @CollectionTable(name="EXPCAT_EXPERIMENT_ERROR_ROOT_CAUSE_ERROR_ID", joinColumns = @JoinColumn(name="ERROR_ID"))
+ public List<String> getRootCauseErrorIdList() {
+ return rootCauseErrorIdList;
+ }
+
+ public void setRootCauseErrorIdList(List<String> rootCauseErrorIdList) {
+ this.rootCauseErrorIdList = rootCauseErrorIdList;
+ }
+
+
+ @ManyToOne(targetEntity = TaskEntity.class, cascade = CascadeType.ALL, fetch = FetchType.LAZY)
+ @JoinColumn(name = "TASK_ID", referencedColumnName = "TASK_ID")
+ public TaskEntity getTask() {
+ return task;
+ }
+
+ public void setTask(TaskEntity task) {
+ this.task = task;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/eee49d36/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/TaskErrorPK.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/TaskErrorPK.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/TaskErrorPK.java
new file mode 100644
index 0000000..e504f83
--- /dev/null
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/TaskErrorPK.java
@@ -0,0 +1,75 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.registry.core.entities.expcatalog;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.Column;
+import javax.persistence.Id;
+import java.io.Serializable;
+
+public class TaskErrorPK implements Serializable {
+ private final static Logger logger = LoggerFactory.getLogger(TaskErrorPK.class);
+ private String errorId;
+ private String taskId;
+
+ @Column(name = "ERROR_ID")
+ @Id
+ public String getErrorId() {
+ return errorId;
+ }
+
+ public void setErrorId(String errorId) {
+ this.errorId = errorId;
+ }
+
+ @Column(name = "TASK_ID")
+ @Id
+ public String getTaskId() {
+ return taskId;
+ }
+
+ public void setTaskId(String processId) {
+ this.taskId = taskId;
+ }
+
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ TaskErrorPK that = (TaskErrorPK) o;
+
+ if (getErrorId() != null ? !getErrorId().equals(that.getErrorId()) : that.getErrorId() != null) return false;
+ if (getTaskId() != null ? !getTaskId().equals(that.getTaskId()) : that.getTaskId() != null) return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = getErrorId() != null ? getErrorId().hashCode() : 0;
+ result = 31 * result + (getTaskId() != null ? getTaskId().hashCode() : 0);
+ return result;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/eee49d36/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/TaskStatusEntity.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/TaskStatusEntity.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/TaskStatusEntity.java
new file mode 100644
index 0000000..2465b48
--- /dev/null
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/TaskStatusEntity.java
@@ -0,0 +1,83 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.registry.core.entities.expcatalog;
+
+import javax.persistence.*;
+
+@Entity
+@Table(name = "EXPCAT_TASK_STATUS")
+@IdClass(TaskStatusPK.class)
+public class TaskStatusEntity {
+ private String taskId;
+ private String state;
+ private long timeOfStateChange;
+ private String reason;
+
+ private TaskEntity task;
+
+ @Id
+ @Column(name = "TASK_ID")
+ public String getTaskId() {
+ return taskId;
+ }
+
+ public void setTaskId(String taskId) {
+ this.taskId = taskId;
+ }
+
+ @Id
+ @Column(name = "STATE")
+ public String getState() {
+ return state;
+ }
+
+ public void setState(String state) {
+ this.state = state;
+ }
+
+ @Column(name = "TIME_OF_STATE_CHANGE")
+ public long getTimeOfStateChange() {
+ return timeOfStateChange;
+ }
+
+ public void setTimeOfStateChange(long timeOfStateChange) {
+ this.timeOfStateChange = timeOfStateChange;
+ }
+
+ @Column(name = "REASON")
+ public String getReason() {
+ return reason;
+ }
+
+ public void setReason(String reason) {
+ this.reason = reason;
+ }
+
+ @ManyToOne(targetEntity = TaskEntity.class, cascade = CascadeType.ALL, fetch = FetchType.LAZY)
+ @JoinColumn(name = "TASK_ID", referencedColumnName = "TASK_ID")
+ public TaskEntity getTask() {
+ return task;
+ }
+
+ public void setTask(TaskEntity task) {
+ this.task = task;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/eee49d36/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/TaskStatusPK.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/TaskStatusPK.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/TaskStatusPK.java
new file mode 100644
index 0000000..167d8a7
--- /dev/null
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/TaskStatusPK.java
@@ -0,0 +1,74 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.registry.core.entities.expcatalog;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.persistence.Column;
+import javax.persistence.Id;
+import java.io.Serializable;
+
+public class TaskStatusPK implements Serializable {
+ private final static Logger logger = LoggerFactory.getLogger(TaskStatusPK.class);
+ private String state;
+ private String taskId;
+
+ @Id
+ @Column(name = "STATUS_ID")
+ public String getState() {
+ return state;
+ }
+
+ public void setState(String state) {
+ this.state = state;
+ }
+
+ @Id
+ @Column(name = "TASK_ID")
+ public String getTaskId() {
+ return taskId;
+ }
+
+ public void setTaskId(String taskId) {
+ this.taskId = taskId;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+
+ TaskStatusPK that = (TaskStatusPK) o;
+
+ if (getState() != null ? !getState().equals(that.getState()) : that.getState() != null) return false;
+ if (getTaskId() != null ? !getTaskId().equals(that.getTaskId()) : that.getTaskId() != null) return false;
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = getState() != null ? getState().hashCode() : 0;
+ result = 31 * result + (getTaskId() != null ? getTaskId().hashCode() : 0);
+ return result;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/eee49d36/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/UserConfigurationEntity.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/UserConfigurationEntity.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/UserConfigurationEntity.java
index 7d27251..b685312 100644
--- a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/UserConfigurationEntity.java
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/expcatalog/UserConfigurationEntity.java
@@ -23,7 +23,7 @@ package org.apache.airavata.registry.core.entities.expcatalog;
import javax.persistence.*;
@Entity
-@Table(name = "USER_CONFIGURATION")
+@Table(name = "EXPCAT_USER_CONFIGURATION")
public class UserConfigurationEntity {
private String experimentId;
private boolean airavataAutoSchedule;
http://git-wip-us.apache.org/repos/asf/airavata/blob/eee49d36/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/workspacecatalog/GatewayEntity.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/workspacecatalog/GatewayEntity.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/workspacecatalog/GatewayEntity.java
index 6ba10fe..c4f1f59 100644
--- a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/workspacecatalog/GatewayEntity.java
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/workspacecatalog/GatewayEntity.java
@@ -23,7 +23,7 @@ package org.apache.airavata.registry.core.entities.workspacecatalog;
import javax.persistence.*;
@Entity
-@Table(name="GATEWAY")
+@Table(name="WORKSPACE_GATEWAY")
public class GatewayEntity {
private String gatewayId;
private String gatewayName;
http://git-wip-us.apache.org/repos/asf/airavata/blob/eee49d36/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/workspacecatalog/NSFDemographicsEntity.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/workspacecatalog/NSFDemographicsEntity.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/workspacecatalog/NSFDemographicsEntity.java
index 4f7aa7a..0bcbafa 100644
--- a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/workspacecatalog/NSFDemographicsEntity.java
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/workspacecatalog/NSFDemographicsEntity.java
@@ -24,7 +24,7 @@ import javax.persistence.*;
import java.util.List;
@Entity
-@Table(name = "NSF_DEMOGRAPHIC")
+@Table(name = "WORKSPACE_NSF_DEMOGRAPHIC")
public class NSFDemographicsEntity {
private String airavataInternalUserId;
private String gender;
http://git-wip-us.apache.org/repos/asf/airavata/blob/eee49d36/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/workspacecatalog/NotificationEntity.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/workspacecatalog/NotificationEntity.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/workspacecatalog/NotificationEntity.java
index 5a0805c..67f8af2 100644
--- a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/workspacecatalog/NotificationEntity.java
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/workspacecatalog/NotificationEntity.java
@@ -23,7 +23,7 @@ package org.apache.airavata.registry.core.entities.workspacecatalog;
import javax.persistence.*;
@Entity
-@Table(name = "NOTIFICATION")
+@Table(name = "WORKSPACE_NOTIFICATION")
public class NotificationEntity {
private String notificationId;
private String gatewayId;
http://git-wip-us.apache.org/repos/asf/airavata/blob/eee49d36/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/workspacecatalog/ProjectEntity.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/workspacecatalog/ProjectEntity.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/workspacecatalog/ProjectEntity.java
index 2cfdd04..31e0868 100644
--- a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/workspacecatalog/ProjectEntity.java
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/workspacecatalog/ProjectEntity.java
@@ -26,7 +26,7 @@ import javax.persistence.Id;
import javax.persistence.Table;
@Entity
-@Table(name = "PROJECT")
+@Table(name = "WORKSPACE_PROJECT")
public class ProjectEntity {
private String projectID;
private String owner;
http://git-wip-us.apache.org/repos/asf/airavata/blob/eee49d36/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/workspacecatalog/UserProfileEntity.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/workspacecatalog/UserProfileEntity.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/workspacecatalog/UserProfileEntity.java
index 11f6e33..7dd51ed 100644
--- a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/workspacecatalog/UserProfileEntity.java
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/entities/workspacecatalog/UserProfileEntity.java
@@ -24,7 +24,7 @@ import javax.persistence.*;
import java.util.List;
@Entity
-@Table(name="USER_PROFILE")
+@Table(name="WORKSPACE_USER_PROFILE")
public class UserProfileEntity {
private String airavataInternalUserId;
private String userId;
http://git-wip-us.apache.org/repos/asf/airavata/blob/eee49d36/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/repositories/expcatalog/ExperimentRepository.java
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/repositories/expcatalog/ExperimentRepository.java b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/repositories/expcatalog/ExperimentRepository.java
index 5a52dff..d30b1de 100644
--- a/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/repositories/expcatalog/ExperimentRepository.java
+++ b/modules/registry-refactoring/src/main/java/org/apache/airavata/registry/core/repositories/expcatalog/ExperimentRepository.java
@@ -77,6 +77,15 @@ public class ExperimentRepository extends AbstractRepository<ExperimentModel, Ex
process.getProcessError().forEach(processErr->processErr.setProcessId(processId));
if(process.getProcessStatus() != null)
process.getProcessStatus().forEach(processStat->processStat.setProcessId(processId));
+
+ if(process.getTasks() != null){
+ process.getTasks().forEach(task->{
+ String taskId = task.getTaskId();
+ task.setParentProcessId(processId);
+
+
+ });
+ }
});
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/eee49d36/modules/registry-refactoring/src/main/resources/META-INF/persistence.xml
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/resources/META-INF/persistence.xml b/modules/registry-refactoring/src/main/resources/META-INF/persistence.xml
index 8367f97..ac9a08f 100644
--- a/modules/registry-refactoring/src/main/resources/META-INF/persistence.xml
+++ b/modules/registry-refactoring/src/main/resources/META-INF/persistence.xml
@@ -40,6 +40,11 @@
<class>org.apache.airavata.registry.core.entities.expcatalog.ProcessOutputEntity</class>
<class>org.apache.airavata.registry.core.entities.expcatalog.ProcessResourceSchedulingEntity</class>
<class>org.apache.airavata.registry.core.entities.expcatalog.ProcessStatusEntity</class>
+ <class>org.apache.airavata.registry.core.entities.expcatalog.TaskEntity</class>
+ <class>org.apache.airavata.registry.core.entities.expcatalog.TaskErrorEntity</class>
+ <class>org.apache.airavata.registry.core.entities.expcatalog.TaskStatusEntity</class>
+ <class>org.apache.airavata.registry.core.entities.expcatalog.JobEntity</class>
+ <class>org.apache.airavata.registry.core.entities.expcatalog.JobStatusEntity</class>
<exclude-unlisted-classes>true</exclude-unlisted-classes>
</persistence-unit>
</persistence>
http://git-wip-us.apache.org/repos/asf/airavata/blob/eee49d36/modules/registry-refactoring/src/main/resources/experiment_catalog.sql
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/resources/experiment_catalog.sql b/modules/registry-refactoring/src/main/resources/experiment_catalog.sql
index 8c11027..3140cd1 100644
--- a/modules/registry-refactoring/src/main/resources/experiment_catalog.sql
+++ b/modules/registry-refactoring/src/main/resources/experiment_catalog.sql
@@ -1,10 +1,10 @@
-CREATE TABLE IF NOT EXISTS EXPERIMENT(
+CREATE TABLE IF NOT EXISTS EXPCAT_EXPERIMENT(
EXPERIMENT_ID VARCHAR (255),
PROJECT_ID VARCHAR (255),
GATEWAY_ID VARCHAR (255),
EXPERIMENT_TYPE VARCHAR (255),
- USER_ID VARCHAR (255),
+ USER_NAME VARCHAR (255),
EXPERIMENT_NAME VARCHAR (255),
CREATION_TIME BIGINT,
DESCRIPTION VARCHAR (255),
@@ -13,19 +13,19 @@ CREATE TABLE IF NOT EXISTS EXPERIMENT(
GATEWAY_INSTANCE_ID VARCHAR (255),
ENABLE_EMAIL_NOTIFICATION TINYINT(1),
PRIMARY KEY (EXPERIMENT_ID),
- FOREIGN KEY (PROJECT_ID) REFERENCES PROJECT(PROJECT_ID) ON DELETE CASCADE,
- FOREIGN KEY (GATEWAY_ID) REFERENCES GATEWAY(GATEWAY_ID) ON DELETE CASCADE,
- FOREIGN KEY (USER_ID) REFERENCES USER_PROFILE(AIRAVATA_INTERNAL_USER_ID) ON DELETE CASCADE
+ FOREIGN KEY (PROJECT_ID) REFERENCES WORKSPACE_PROJECT(PROJECT_ID) ON DELETE CASCADE,
+ FOREIGN KEY (GATEWAY_ID) REFERENCES WORKSPACE_GATEWAY(GATEWAY_ID) ON DELETE CASCADE,
+ FOREIGN KEY (USER_NAME) REFERENCES WORKSPACE_USER_PROFILE(AIRAVATA_INTERNAL_USER_ID) ON DELETE CASCADE
);
-CREATE TABLE IF NOT EXISTS EXPERIMENT_EMAIL (
+CREATE TABLE IF NOT EXISTS EXPCAT_EXPERIMENT_EMAIL (
EXPERIMENT_ID VARCHAR (255),
EMAIL VARCHAR (255),
PRIMARY KEY (EXPERIMENT_ID, EMAIL),
- FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE
+ FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPCAT_EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE
);
-CREATE TABLE IF NOT EXISTS USER_CONFIGURATION(
+CREATE TABLE IF NOT EXISTS EXPCAT_USER_CONFIGURATION(
EXPERIMENT_ID VARCHAR (255),
AIRAVATA_AUTO_SCHEDULE TINYINT(1),
OVERRIDE_MANUAL_SCHEDULED_PARAMS TINYINT(1),
@@ -35,10 +35,10 @@ CREATE TABLE IF NOT EXISTS USER_CONFIGURATION(
STORAGE_ID VARCHAR (255),
EXPERIMENT_DATA_DIR VARCHAR (255),
PRIMARY KEY (EXPERIMENT_ID),
- FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE
+ FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPCAT_EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE
);
-CREATE TABLE IF NOT EXISTS COMPUTE_RESOURCE_SCHEDULING(
+CREATE TABLE IF NOT EXISTS EXPCAT_COMPUTE_RESOURCE_SCHEDULING(
EXPERIMENT_ID VARCHAR (255),
RESOURCE_HOST_ID VARCHAR (255),
CPU_COUNT INT,
@@ -53,10 +53,10 @@ CREATE TABLE IF NOT EXISTS COMPUTE_RESOURCE_SCHEDULING(
OVERRIDE_SCRATCH_LOCATION VARCHAR (255),
OVERRIDE_ALLOCATION_PROJECT_NUMBER VARCHAR (255),
PRIMARY KEY (EXPERIMENT_ID),
- FOREIGN KEY (EXPERIMENT_ID) REFERENCES USER_CONFIGURATION(EXPERIMENT_ID) ON DELETE CASCADE
+ FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPCAT_USER_CONFIGURATION(EXPERIMENT_ID) ON DELETE CASCADE
);
-CREATE TABLE IF NOT EXISTS EXPERIMENT_INPUT(
+CREATE TABLE IF NOT EXISTS EXPCAT_EXPERIMENT_INPUT(
EXPERIMENT_ID VARCHAR (255),
INPUT_NAME VARCHAR (255),
INPUT_VALUE VARCHAR (255),
@@ -71,10 +71,10 @@ CREATE TABLE IF NOT EXISTS EXPERIMENT_INPUT(
DATA_STAGED TINYINT(1),
STORAGE_RESOURCE_ID VARCHAR (255),
PRIMARY KEY (EXPERIMENT_ID,INPUT_NAME),
- FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE
+ FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPCAT_EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE
);
-CREATE TABLE IF NOT EXISTS EXPERIMENT_OUTPUT(
+CREATE TABLE IF NOT EXISTS EXPCAT_EXPERIMENT_OUTPUT(
EXPERIMENT_ID VARCHAR (255),
OUTPUT_NAME VARCHAR (255),
OUTPUT_VALUE VARCHAR (255),
@@ -88,10 +88,10 @@ CREATE TABLE IF NOT EXISTS EXPERIMENT_OUTPUT(
OUTPUT_STREAMING TINYINT(1),
STORAGE_RESOURCE_ID VARCHAR (255),
PRIMARY KEY (EXPERIMENT_ID,OUTPUT_NAME),
- FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE
+ FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPCAT_EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE
);
-CREATE TABLE IF NOT EXISTS EXPERIMENT_ERROR(
+CREATE TABLE IF NOT EXISTS EXPCAT_EXPERIMENT_ERROR(
ERROR_ID VARCHAR (255),
EXPERIMENT_ID VARCHAR (255),
CREATION_TIME BIGINT,
@@ -99,26 +99,26 @@ CREATE TABLE IF NOT EXISTS EXPERIMENT_ERROR(
USER_FRIENDLY_MESSAGE VARCHAR (255),
TRANSIENT_OR_PERSISTENT TINYINT,
PRIMARY KEY (ERROR_ID, EXPERIMENT_ID),
- FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE
+ FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPCAT_EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE
);
-CREATE TABLE IF NOT EXISTS EXPERIMENT_ERROR_ROOT_CAUSE_ERROR_ID(
+CREATE TABLE IF NOT EXISTS EXPCAT_EXPERIMENT_ERROR_ROOT_CAUSE_ERROR_ID(
ERROR_ID VARCHAR (255),
ROOT_CAUSE_ERROR_ID VARCHAR (255),
PRIMARY KEY (ERROR_ID, ROOT_CAUSE_ERROR_ID),
- FOREIGN KEY(ERROR_ID) REFERENCES EXPERIMENT_ERROR(ERROR_ID) ON DELETE CASCADE
+ FOREIGN KEY(ERROR_ID) REFERENCES EXPCAT_EXPERIMENT_ERROR(ERROR_ID) ON DELETE CASCADE
);
-CREATE TABLE IF NOT EXISTS EXPERIMENT_STATUS(
+CREATE TABLE IF NOT EXISTS EXPCAT_EXPERIMENT_STATUS(
EXPERIMENT_ID VARCHAR (255),
STATE VARCHAR (255),
TIME_OF_STATE_CHANGE BIGINT,
REASON VARCHAR (255),
PRIMARY KEY (EXPERIMENT_ID, STATE),
- FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE
+ FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPCAT_EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE
);
-CREATE TABLE IF NOT EXISTS PROCESS(
+CREATE TABLE IF NOT EXISTS EXPCAT_PROCESS(
PROCESS_ID VARCHAR (255),
EXPERIMENT_ID VARCHAR (255),
CREATION_TIME BIGINT,
@@ -136,17 +136,17 @@ CREATE TABLE IF NOT EXISTS PROCESS(
EXPERIMENT_DATA_DIR VARCHAR (255),
USER_NAME VARCHAR (255),
PRIMARY KEY (PROCESS_ID),
- FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE
+ FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPCAT_EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE
);
-CREATE TABLE IF NOT EXISTS PROCESS_EMAIL (
+CREATE TABLE IF NOT EXISTS EXPCAT_PROCESS_EMAIL (
PROCESS_ID VARCHAR (255),
EMAIL VARCHAR (255),
PRIMARY KEY (PROCESS_ID, EMAIL),
- FOREIGN KEY (PROCESS_ID) REFERENCES PROCESS(PROCESS_ID) ON DELETE CASCADE
+ FOREIGN KEY (PROCESS_ID) REFERENCES EXPCAT_PROCESS(PROCESS_ID) ON DELETE CASCADE
);
-CREATE TABLE IF NOT EXISTS PROCESS_RESOURCE_SCHEDULING(
+CREATE TABLE IF NOT EXISTS EXPCAT_PROCESS_RESOURCE_SCHEDULING(
PROCESS_ID VARCHAR (255),
RESOURCE_HOST_ID VARCHAR (255),
CPU_COUNT INT,
@@ -161,10 +161,10 @@ CREATE TABLE IF NOT EXISTS PROCESS_RESOURCE_SCHEDULING(
OVERRIDE_SCRATCH_LOCATION VARCHAR (255),
OVERRIDE_ALLOCATION_PROJECT_NUMBER VARCHAR (255),
PRIMARY KEY (PROCESS_ID),
- FOREIGN KEY (PROCESS_ID) REFERENCES PROCESS(PROCESS_ID) ON DELETE CASCADE
+ FOREIGN KEY (PROCESS_ID) REFERENCES EXPCAT_PROCESS(PROCESS_ID) ON DELETE CASCADE
);
-CREATE TABLE IF NOT EXISTS PROCESS_INPUT(
+CREATE TABLE IF NOT EXISTS EXPCAT_PROCESS_INPUT(
PROCESS_ID VARCHAR (255),
INPUT_NAME VARCHAR (255),
INPUT_VALUE VARCHAR (255),
@@ -179,10 +179,10 @@ CREATE TABLE IF NOT EXISTS PROCESS_INPUT(
DATA_STAGED TINYINT(1),
STORAGE_RESOURCE_ID VARCHAR (255),
PRIMARY KEY (PROCESS_ID,INPUT_NAME),
- FOREIGN KEY (PROCESS_ID) REFERENCES PROCESS(PROCESS_ID) ON DELETE CASCADE
+ FOREIGN KEY (PROCESS_ID) REFERENCES EXPCAT_PROCESS(PROCESS_ID) ON DELETE CASCADE
);
-CREATE TABLE IF NOT EXISTS PROCESS_OUTPUT(
+CREATE TABLE IF NOT EXISTS EXPCAT_PROCESS_OUTPUT(
PROCESS_ID VARCHAR (255),
OUTPUT_NAME VARCHAR (255),
OUTPUT_VALUE VARCHAR (255),
@@ -196,10 +196,10 @@ CREATE TABLE IF NOT EXISTS PROCESS_OUTPUT(
OUTPUT_STREAMING TINYINT(1),
STORAGE_RESOURCE_ID VARCHAR (255),
PRIMARY KEY (PROCESS_ID,OUTPUT_NAME),
- FOREIGN KEY (PROCESS_ID) REFERENCES PROCESS(PROCESS_ID) ON DELETE CASCADE
+ FOREIGN KEY (PROCESS_ID) REFERENCES EXPCAT_PROCESS(PROCESS_ID) ON DELETE CASCADE
);
-CREATE TABLE IF NOT EXISTS PROCESS_ERROR(
+CREATE TABLE IF NOT EXISTS EXPCAT_PROCESS_ERROR(
ERROR_ID VARCHAR (255),
PROCESS_ID VARCHAR (255),
CREATION_TIME BIGINT,
@@ -207,21 +207,79 @@ CREATE TABLE IF NOT EXISTS PROCESS_ERROR(
USER_FRIENDLY_MESSAGE VARCHAR (255),
TRANSIENT_OR_PERSISTENT TINYINT,
PRIMARY KEY (ERROR_ID, PROCESS_ID),
- FOREIGN KEY (PROCESS_ID) REFERENCES PROCESS(PROCESS_ID) ON DELETE CASCADE
+ FOREIGN KEY (PROCESS_ID) REFERENCES EXPCAT_PROCESS(PROCESS_ID) ON DELETE CASCADE
);
-CREATE TABLE IF NOT EXISTS PROCESS_ERROR_ROOT_CAUSE_ERROR_ID(
+CREATE TABLE IF NOT EXISTS EXPCAT_PROCESS_ERROR_ROOT_CAUSE_ERROR_ID(
ERROR_ID VARCHAR (255),
ROOT_CAUSE_ERROR_ID VARCHAR (255),
PRIMARY KEY (ERROR_ID, ROOT_CAUSE_ERROR_ID),
- FOREIGN KEY(ERROR_ID) REFERENCES PROCESS_ERROR(ERROR_ID) ON DELETE CASCADE
+ FOREIGN KEY(ERROR_ID) REFERENCES EXPCAT_PROCESS_ERROR(ERROR_ID) ON DELETE CASCADE
);
-CREATE TABLE IF NOT EXISTS PROCESS_STATUS(
+CREATE TABLE IF NOT EXISTS EXPCAT_PROCESS_STATUS(
PROCESS_ID VARCHAR (255),
STATE VARCHAR (255),
TIME_OF_STATE_CHANGE BIGINT,
REASON VARCHAR (255),
PRIMARY KEY (PROCESS_ID, STATE),
- FOREIGN KEY (PROCESS_ID) REFERENCES PROCESS(PROCESS_ID) ON DELETE CASCADE
+ FOREIGN KEY (PROCESS_ID) REFERENCES EXPCAT_PROCESS(PROCESS_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE IF NOT EXISTS EXPCAT_TASK(
+ TASK_ID VARCHAR (255),
+ TASK_TYPE VARCHAR (255),
+ PARENT_PROCESS_ID VARCHAR (255),
+ CREATION_TIME BIGINT,
+ LAST_UPDATE_TIME BIGINT,
+ TASK_DETAIL VARCHAR (255),
+ SUB_TASK_MODEL BLOB,
+ PRIMARY KEY (TASK_ID),
+ FOREIGN KEY (PARENT_PROCESS_ID) REFERENCES EXPCAT_PROCESS(PROCESS_ID)
+);
+
+CREATE TABLE IF NOT EXISTS EXPCAT_TASK_ERROR(
+ ERROR_ID VARCHAR (255),
+ TASK_ID VARCHAR (255),
+ CREATION_TIME BIGINT,
+ ACTUAL_ERROR_MESSAGE VARCHAR (255),
+ USER_FRIENDLY_MESSAGE VARCHAR (255),
+ TRANSIENT_OR_PERSISTENT TINYINT,
+ PRIMARY KEY (ERROR_ID, TASK_ID),
+ FOREIGN KEY (TASK_ID) REFERENCES EXPCAT_TASK(TASK_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE IF NOT EXISTS EXPCAT_TASK_STATUS(
+ TASK_ID VARCHAR (255),
+ STATE VARCHAR (255),
+ TIME_OF_STATE_CHANGE BIGINT,
+ REASON VARCHAR (255),
+ PRIMARY KEY (TASK_ID, STATE),
+ FOREIGN KEY (TASK_ID) REFERENCES EXPCAT_TASK(TASK_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE IF NOT EXISTS EXPCAT_JOB(
+ JOB_ID VARCHAR (255),
+ TASK_ID VARCHAR (255),
+ PROCESS_ID VARCHAR (255),
+ JOB_DESCRIPTION VARCHAR (255),
+ CREATION_TIME BIGINT,
+ COMPUTE_RESOURCE_CONSUMED VARCHAR (255),
+ JOB_NAME VARCHAR (255),
+ WORKING_DIR VARCHAR (255),
+ STDOUT TEXT,
+ STDERR TEXT,
+ EXIT_CODE INT(11),
+ PRIMARY KEY(JOB_ID),
+ FOREIGN KEY(TASK_ID) REFERENCES EXPCAT_TASK(TASK_ID),
+ FOREIGN KEY(PROCESS_ID) REFERENCES EXPCAT_PROCESS(PROCESS_ID)
+);
+
+CREATE TABLE IF NOT EXISTS EXPCAT_JOB_STATUS(
+ JOB_ID VARCHAR (255),
+ STATE VARCHAR (255),
+ TIME_OF_STATE_CHANGE BIGINT,
+ REASON VARCHAR (255),
+ PRIMARY KEY (JOB_ID, STATE),
+ FOREIGN KEY (JOB_ID) REFERENCES EXPCAT_JOB(JOB_ID) ON DELETE CASCADE
);
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/eee49d36/modules/registry-refactoring/src/main/resources/workspace_catalog.sql
----------------------------------------------------------------------
diff --git a/modules/registry-refactoring/src/main/resources/workspace_catalog.sql b/modules/registry-refactoring/src/main/resources/workspace_catalog.sql
index 8b87bc2..debdba4 100644
--- a/modules/registry-refactoring/src/main/resources/workspace_catalog.sql
+++ b/modules/registry-refactoring/src/main/resources/workspace_catalog.sql
@@ -1,5 +1,5 @@
-CREATE TABLE IF NOT EXISTS GATEWAY(
+CREATE TABLE IF NOT EXISTS WORKSPACE_GATEWAY(
GATEWAY_ID VARCHAR (255),
GATEWAY_NAME VARCHAR (255),
GATEWAY_DOMAIN VARCHAR (255),
@@ -22,7 +22,7 @@ CREATE TABLE IF NOT EXISTS GATEWAY(
PRIMARY KEY (GATEWAY_ID)
);
-CREATE TABLE IF NOT EXISTS NOTIFICATION (
+CREATE TABLE IF NOT EXISTS WORKSPACE_NOTIFICATION (
NOTIFICATION_ID VARCHAR (255),
GATEWAY_ID VARCHAR (255),
TITLE VARCHAR (255),
@@ -32,10 +32,10 @@ CREATE TABLE IF NOT EXISTS NOTIFICATION (
EXPIRATION_TIME BIGINT,
PRIORITY VARCHAR (255),
PRIMARY KEY (NOTIFICATION_ID),
- FOREIGN KEY (GATEWAY_ID) REFERENCES GATEWAY(GATEWAY_ID) ON DELETE CASCADE
+ FOREIGN KEY (GATEWAY_ID) REFERENCES WORKSPACE_GATEWAY(GATEWAY_ID) ON DELETE CASCADE
);
-CREATE TABLE IF NOT EXISTS USER_PROFILE (
+CREATE TABLE IF NOT EXISTS WORKSPACE_USER_PROFILE (
AIRAVATA_INTERNAL_USER_ID VARCHAR (255),
USER_ID VARCHAR (255),
GATEWAY_ID VARCHAR (255),
@@ -53,66 +53,66 @@ CREATE TABLE IF NOT EXISTS USER_PROFILE (
GPG_KEY VARCHAR (8192),
TIME_ZONE VARCHAR (255),
PRIMARY KEY (AIRAVATA_INTERNAL_USER_ID),
- FOREIGN KEY (GATEWAY_ID) REFERENCES GATEWAY(GATEWAY_ID) ON DELETE CASCADE
+ FOREIGN KEY (GATEWAY_ID) REFERENCES WORKSPACE_GATEWAY(GATEWAY_ID) ON DELETE CASCADE
);
-CREATE TABLE IF NOT EXISTS USER_PROFILE_EMAIL (
+CREATE TABLE IF NOT EXISTS WORKSPACE_USER_PROFILE_EMAIL (
AIRAVATA_INTERNAL_USER_ID VARCHAR (255),
EMAIL VARCHAR (255),
PRIMARY KEY (AIRAVATA_INTERNAL_USER_ID, EMAIL),
- FOREIGN KEY (AIRAVATA_INTERNAL_USER_ID) REFERENCES USER_PROFILE(AIRAVATA_INTERNAL_USER_ID) ON DELETE CASCADE
+ FOREIGN KEY (AIRAVATA_INTERNAL_USER_ID) REFERENCES WORKSPACE_USER_PROFILE(AIRAVATA_INTERNAL_USER_ID) ON DELETE CASCADE
);
-CREATE TABLE IF NOT EXISTS USER_PROFILE_PHONE (
+CREATE TABLE IF NOT EXISTS WORKSPACE_USER_PROFILE_PHONE (
AIRAVATA_INTERNAL_USER_ID VARCHAR (255),
PHONE VARCHAR (255),
PRIMARY KEY (AIRAVATA_INTERNAL_USER_ID, PHONE ),
- FOREIGN KEY (AIRAVATA_INTERNAL_USER_ID) REFERENCES USER_PROFILE(AIRAVATA_INTERNAL_USER_ID) ON DELETE CASCADE
+ FOREIGN KEY (AIRAVATA_INTERNAL_USER_ID) REFERENCES WORKSPACE_USER_PROFILE(AIRAVATA_INTERNAL_USER_ID) ON DELETE CASCADE
);
-CREATE TABLE IF NOT EXISTS USER_PROFILE_NATIONALITY (
+CREATE TABLE IF NOT EXISTS WORKSPACE_USER_PROFILE_NATIONALITY (
AIRAVATA_INTERNAL_USER_ID VARCHAR (255),
NATIONALITY VARCHAR (255),
PRIMARY KEY (AIRAVATA_INTERNAL_USER_ID, NATIONALITY ),
- FOREIGN KEY (AIRAVATA_INTERNAL_USER_ID) REFERENCES USER_PROFILE(AIRAVATA_INTERNAL_USER_ID) ON DELETE CASCADE
+ FOREIGN KEY (AIRAVATA_INTERNAL_USER_ID) REFERENCES WORKSPACE_USER_PROFILE(AIRAVATA_INTERNAL_USER_ID) ON DELETE CASCADE
);
-CREATE TABLE IF NOT EXISTS USER_PROFILE_LABELED_URI (
+CREATE TABLE IF NOT EXISTS WORKSPACE_USER_PROFILE_LABELED_URI (
AIRAVATA_INTERNAL_USER_ID VARCHAR (255),
LABELED_URI VARCHAR (255),
PRIMARY KEY (AIRAVATA_INTERNAL_USER_ID, LABELED_URI ),
- FOREIGN KEY (AIRAVATA_INTERNAL_USER_ID) REFERENCES USER_PROFILE(AIRAVATA_INTERNAL_USER_ID) ON DELETE CASCADE
+ FOREIGN KEY (AIRAVATA_INTERNAL_USER_ID) REFERENCES WORKSPACE_USER_PROFILE(AIRAVATA_INTERNAL_USER_ID) ON DELETE CASCADE
);
-CREATE TABLE IF NOT EXISTS NSF_DEMOGRAPHIC (
+CREATE TABLE IF NOT EXISTS WORKSPACE_NSF_DEMOGRAPHIC (
AIRAVATA_INTERNAL_USER_ID VARCHAR (255),
GENDER VARCHAR (255),
PRIMARY KEY (AIRAVATA_INTERNAL_USER_ID),
- FOREIGN KEY (AIRAVATA_INTERNAL_USER_ID) REFERENCES USER_PROFILE(AIRAVATA_INTERNAL_USER_ID) ON DELETE CASCADE
+ FOREIGN KEY (AIRAVATA_INTERNAL_USER_ID) REFERENCES WORKSPACE_USER_PROFILE(AIRAVATA_INTERNAL_USER_ID) ON DELETE CASCADE
);
-CREATE TABLE IF NOT EXISTS NSF_DEMOGRAPHIC_ETHNICITY (
+CREATE TABLE IF NOT EXISTS WORKSPACE_NSF_DEMOGRAPHIC_ETHNICITY (
AIRAVATA_INTERNAL_USER_ID VARCHAR (255),
ETHNICITY VARCHAR (255),
PRIMARY KEY (AIRAVATA_INTERNAL_USER_ID, ETHNICITY ),
- FOREIGN KEY (AIRAVATA_INTERNAL_USER_ID) REFERENCES NSF_DEMOGRAPHIC(AIRAVATA_INTERNAL_USER_ID) ON DELETE CASCADE
+ FOREIGN KEY (AIRAVATA_INTERNAL_USER_ID) REFERENCES WORKSPACE_NSF_DEMOGRAPHIC(AIRAVATA_INTERNAL_USER_ID) ON DELETE CASCADE
);
-CREATE TABLE IF NOT EXISTS NSF_DEMOGRAPHIC_RACE (
+CREATE TABLE IF NOT EXISTS WORKSPACE_NSF_DEMOGRAPHIC_RACE (
AIRAVATA_INTERNAL_USER_ID VARCHAR (255),
RACE VARCHAR (255),
PRIMARY KEY (AIRAVATA_INTERNAL_USER_ID, RACE ),
- FOREIGN KEY (AIRAVATA_INTERNAL_USER_ID) REFERENCES NSF_DEMOGRAPHIC(AIRAVATA_INTERNAL_USER_ID) ON DELETE CASCADE
+ FOREIGN KEY (AIRAVATA_INTERNAL_USER_ID) REFERENCES WORKSPACE_NSF_DEMOGRAPHIC(AIRAVATA_INTERNAL_USER_ID) ON DELETE CASCADE
);
-CREATE TABLE IF NOT EXISTS NSF_DEMOGRAPHIC_DISABILITY (
+CREATE TABLE IF NOT EXISTS WORKSPACE_NSF_DEMOGRAPHIC_DISABILITY (
AIRAVATA_INTERNAL_USER_ID VARCHAR (255),
DISABILITY VARCHAR (255),
PRIMARY KEY (AIRAVATA_INTERNAL_USER_ID, DISABILITY ),
- FOREIGN KEY (AIRAVATA_INTERNAL_USER_ID) REFERENCES NSF_DEMOGRAPHIC(AIRAVATA_INTERNAL_USER_ID) ON DELETE CASCADE
+ FOREIGN KEY (AIRAVATA_INTERNAL_USER_ID) REFERENCES WORKSPACE_NSF_DEMOGRAPHIC(AIRAVATA_INTERNAL_USER_ID) ON DELETE CASCADE
);
-CREATE TABLE IF NOT EXISTS PROJECT(
+CREATE TABLE IF NOT EXISTS WORKSPACE_PROJECT(
PROJECT_ID VARCHAR (255),
OWNER VARCHAR (255),
GATEWAY_ID VARCHAR (255),
@@ -120,6 +120,6 @@ CREATE TABLE IF NOT EXISTS PROJECT(
DESCRIPTION VARCHAR (255),
CREATION_TIME BIGINT,
PRIMARY KEY (PROJECT_ID),
- FOREIGN KEY(OWNER) REFERENCES USER_PROFILE(AIRAVATA_INTERNAL_USER_ID),
- FOREIGN KEY(GATEWAY_ID) REFERENCES GATEWAY(GATEWAY_ID) ON DELETE CASCADE
+ FOREIGN KEY(OWNER) REFERENCES WORKSPACE_USER_PROFILE(AIRAVATA_INTERNAL_USER_ID),
+ FOREIGN KEY(GATEWAY_ID) REFERENCES WORKSPACE_GATEWAY(GATEWAY_ID) ON DELETE CASCADE
);
\ No newline at end of file