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: adding default constructor to registry impl and fix some build issues
Date Thu, 27 Feb 2014 16:06:13 GMT
adding default constructor to registry impl and fix some build issues


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

Branch: refs/heads/master
Commit: 7f4e406a16048afd077de5245389c77e7f295e2c
Parents: 67d283f
Author: chathuri <chathuri@apache.org>
Authored: Thu Feb 27 11:05:57 2014 -0500
Committer: chathuri <chathuri@apache.org>
Committed: Thu Feb 27 11:05:57 2014 -0500

----------------------------------------------------------------------
 .../orchestrator/core/BaseOrchestratorTest.java |    4 +-
 .../orchestrator/core/util/Initialize.java      |   10 +-
 .../test/resources/airavata-registry-derby.sql  |  325 -----
 .../src/test/resources/registry-derby.sql       |  380 ++++++
 .../registry/jpa/impl/ExperimentRegistry.java   |  685 +++++-----
 .../registry/jpa/impl/RegistryImpl.java         |   29 +-
 .../registry/jpa/model/Experiment.java          |    6 +-
 .../jpa/resources/ExperimentResource.java       |   28 +-
 .../registry/jpa/resources/ProjectResource.java |    2 +-
 .../registry/jpa/resources/Utils.java           |    3 +-
 .../registry/jpa/resources/WorkerResource.java  |    2 +-
 .../jpa/utils/ThriftDataModelConversion.java    |    2 +-
 .../src/main/resources/registry-mysql.sql       |    2 +-
 .../jpa/ComputationalSchedulingTest.java        |    2 +-
 .../registry/jpa/ExperimentResourceTest.java    |    2 +-
 .../registry/jpa/GatewayResourceTest.java       |    2 +-
 .../registry/jpa/TaskDetailResourceTest.java    |    2 +-
 .../jpa/WorkflowNodeDetailResourceTest.java     |    2 +-
 .../api/test/AiravataRegistryAPITest.java       | 1208 +++++++++---------
 .../registry/api/test/util/Initialize.java      |    2 +-
 .../test/resources/airavata-registry-derby.sql  |  325 -----
 .../src/test/resources/registry-derby.sql       |  380 ++++++
 .../xbaya/invoker/EmbeddedGFacInvoker.java      |    3 +-
 23 files changed, 1717 insertions(+), 1689 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/7f4e406a/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/BaseOrchestratorTest.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/BaseOrchestratorTest.java
b/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/BaseOrchestratorTest.java
index a10ce12..279436d 100644
--- a/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/BaseOrchestratorTest.java
+++ b/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/BaseOrchestratorTest.java
@@ -40,11 +40,11 @@ public class BaseOrchestratorTest {
     private DocumentCreator documentCreator;
 
     public void setUp() throws Exception {
-        initialize = new Initialize("airavata-registry-derby.sql");
+        initialize = new Initialize("registry-derby.sql");
         initialize.initializeDB();
         gatewayResource = (GatewayResource) ResourceUtils.getGateway("default");
         workerResource = (WorkerResource) ResourceUtils.getWorker(gatewayResource.getGatewayName(),
"admin");
-        userResource = (UserResource) gatewayResource.create(ResourceType.USER);
+        userResource = new UserResource();
         userResource.setUserName("admin");
         userResource.setPassword("admin");
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/7f4e406a/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/util/Initialize.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/util/Initialize.java
b/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/util/Initialize.java
index e69b84b..4b46c27 100644
--- a/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/util/Initialize.java
+++ b/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/util/Initialize.java
@@ -22,6 +22,7 @@ package org.apache.airavata.orchestrator.core.util;
 
 import org.apache.airavata.persistance.registry.jpa.Resource;
 import org.apache.airavata.persistance.registry.jpa.ResourceType;
+import org.apache.airavata.persistance.registry.jpa.ResourceUtils;
 import org.apache.airavata.persistance.registry.jpa.resources.*;
 import org.apache.airavata.registry.api.exception.RegistrySettingsException;
 import org.apache.airavata.registry.api.util.RegistrySettings;
@@ -40,7 +41,7 @@ import java.util.StringTokenizer;
 public class Initialize {
     private static final Logger logger = LoggerFactory.getLogger(Initialize.class);
     public static final String DERBY_SERVER_MODE_SYS_PROPERTY = "derby.drda.startNetworkServer";
-    public  String scriptName = "airavata-registry-derby.sql";
+    public  String scriptName = "registry-derby.sql";
     private NetworkServerControl server;
     private static final String delimiter = ";";
     public static final String PERSISTANT_DATA = "Configuration";
@@ -139,14 +140,11 @@ public class Initialize {
         }
 
         try{
-            GatewayResource gatewayResource = new GatewayResource();
-            gatewayResource.setGatewayName(RegistrySettings.getSetting("default.registry.gateway"));
+            GatewayResource gatewayResource = (GatewayResource)ResourceUtils.createGateway(RegistrySettings.getSetting("default.registry.gateway"));
             gatewayResource.setOwner(RegistrySettings.getSetting("default.registry.gateway"));
             gatewayResource.save();
 
-            UserResource userResource = (UserResource) gatewayResource.create(ResourceType.USER);
-            userResource.setUserName(RegistrySettings.getSetting("default.registry.user"));
-            userResource.setPassword(RegistrySettings.getSetting("default.registry.password"));
+            UserResource userResource = ResourceUtils.createUser(RegistrySettings.getSetting("default.registry.user"),RegistrySettings.getSetting("default.registry.password"));
             userResource.save();
 
             WorkerResource workerResource = (WorkerResource) gatewayResource.create(ResourceType.GATEWAY_WORKER);

http://git-wip-us.apache.org/repos/asf/airavata/blob/7f4e406a/modules/orchestrator/orchestrator-core/src/test/resources/airavata-registry-derby.sql
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/test/resources/airavata-registry-derby.sql
b/modules/orchestrator/orchestrator-core/src/test/resources/airavata-registry-derby.sql
deleted file mode 100644
index 04e25c0..0000000
--- a/modules/orchestrator/orchestrator-core/src/test/resources/airavata-registry-derby.sql
+++ /dev/null
@@ -1,325 +0,0 @@
-/*
- *
- * 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.
- *
- */
-CREATE TABLE GATEWAY
-(
-        GATEWAY_NAME VARCHAR(255),
-	      OWNER VARCHAR(255),
-        PRIMARY KEY (GATEWAY_NAME)
-);
-
-CREATE TABLE CONFIGURATION
-(
-        CONFIG_KEY VARCHAR(255),
-        CONFIG_VAL VARCHAR(255),
-        EXPIRE_DATE TIMESTAMP DEFAULT '0000-00-00 00:00:00',
-        CATEGORY_ID VARCHAR (255),
-        PRIMARY KEY(CONFIG_KEY, CONFIG_VAL, CATEGORY_ID)
-);
-
-INSERT INTO CONFIGURATION (CONFIG_KEY, CONFIG_VAL, EXPIRE_DATE, CATEGORY_ID) VALUES('registry.version',
'0.12', CURRENT_TIMESTAMP ,'SYSTEM');
-
-CREATE TABLE USERS
-(
-        USER_NAME VARCHAR(255),
-        PASSWORD VARCHAR(255),
-        PRIMARY KEY(USER_NAME)
-);
-
-CREATE TABLE GATEWAY_WORKER
-(
-        GATEWAY_NAME VARCHAR(255),
-        USER_NAME VARCHAR(255),
-        PRIMARY KEY (GATEWAY_NAME, USER_NAME),
-        FOREIGN KEY (GATEWAY_NAME) REFERENCES GATEWAY(GATEWAY_NAME) ON DELETE CASCADE,
-        FOREIGN KEY (USER_NAME) REFERENCES USERS(USER_NAME) ON DELETE CASCADE
-);
-
-CREATE TABLE PROJECT
-(
-         GATEWAY_NAME VARCHAR(255),
-         USER_NAME VARCHAR(255),
-         PROJECT_NAME VARCHAR(255),
-         PRIMARY KEY (PROJECT_NAME),
-         FOREIGN KEY (GATEWAY_NAME) REFERENCES GATEWAY(GATEWAY_NAME) ON DELETE CASCADE,
-         FOREIGN KEY (USER_NAME) REFERENCES USERS(USER_NAME) ON DELETE CASCADE
-);
-
-CREATE TABLE PUBLISHED_WORKFLOW
-(
-         GATEWAY_NAME VARCHAR(255),
-         CREATED_USER VARCHAR(255),
-         PUBLISH_WORKFLOW_NAME VARCHAR(255),
-         VERSION VARCHAR(255),
-         PUBLISHED_DATE TIMESTAMP DEFAULT '0000-00-00 00:00:00',
-         PATH VARCHAR (255),
-         WORKFLOW_CONTENT BLOB,
-         PRIMARY KEY(GATEWAY_NAME, PUBLISH_WORKFLOW_NAME),
-         FOREIGN KEY (GATEWAY_NAME) REFERENCES GATEWAY(GATEWAY_NAME) ON DELETE CASCADE,
-         FOREIGN KEY (CREATED_USER) REFERENCES USERS(USER_NAME) ON DELETE CASCADE
-);
-
-CREATE TABLE USER_WORKFLOW
-(
-         GATEWAY_NAME VARCHAR(255),
-         OWNER VARCHAR(255),
-         TEMPLATE_NAME VARCHAR(255),
-         LAST_UPDATED_TIME TIMESTAMP DEFAULT CURRENT TIMESTAMP,
-         PATH VARCHAR (255),
-         WORKFLOW_GRAPH BLOB,
-         PRIMARY KEY(GATEWAY_NAME, OWNER, TEMPLATE_NAME),
-         FOREIGN KEY (GATEWAY_NAME) REFERENCES GATEWAY(GATEWAY_NAME) ON DELETE CASCADE,
-         FOREIGN KEY (OWNER) REFERENCES USERS(USER_NAME) ON DELETE CASCADE
-);
-
-CREATE TABLE HOST_DESCRIPTOR
-(
-         GATEWAY_NAME VARCHAR(255),
-         UPDATED_USER VARCHAR(255),
-         HOST_DESCRIPTOR_ID VARCHAR(255),
-         HOST_DESCRIPTOR_XML BLOB,
-         PRIMARY KEY(GATEWAY_NAME, HOST_DESCRIPTOR_ID),
-         FOREIGN KEY (GATEWAY_NAME) REFERENCES GATEWAY(GATEWAY_NAME) ON DELETE CASCADE,
-         FOREIGN KEY (UPDATED_USER) REFERENCES USERS(USER_NAME) ON DELETE CASCADE
-);
-
-CREATE TABLE SERVICE_DESCRIPTOR
-(
-         GATEWAY_NAME VARCHAR(255),
-         UPDATED_USER VARCHAR(255),
-         SERVICE_DESCRIPTOR_ID VARCHAR(255),
-         SERVICE_DESCRIPTOR_XML BLOB,
-         PRIMARY KEY(GATEWAY_NAME,SERVICE_DESCRIPTOR_ID),
-         FOREIGN KEY (GATEWAY_NAME) REFERENCES GATEWAY(GATEWAY_NAME) ON DELETE CASCADE,
-         FOREIGN KEY (UPDATED_USER) REFERENCES USERS(USER_NAME) ON DELETE CASCADE
-);
-
-CREATE TABLE APPLICATION_DESCRIPTOR
-(
-         GATEWAY_NAME VARCHAR(255),
-         UPDATED_USER VARCHAR(255),
-         APPLICATION_DESCRIPTOR_ID VARCHAR(255),
-         HOST_DESCRIPTOR_ID VARCHAR(255),
-         SERVICE_DESCRIPTOR_ID VARCHAR(255),
-         APPLICATION_DESCRIPTOR_XML BLOB,
-         PRIMARY KEY(GATEWAY_NAME,APPLICATION_DESCRIPTOR_ID),
-         FOREIGN KEY (GATEWAY_NAME) REFERENCES GATEWAY(GATEWAY_NAME) ON DELETE CASCADE,
-         FOREIGN KEY (UPDATED_USER) REFERENCES USERS(USER_NAME) ON DELETE CASCADE
-);
-
-CREATE TABLE EXPERIMENT_METADATA
-(
-          EXPERIMENT_ID VARCHAR(255) NOT NULL,
-          EXPERIMENT_NAME VARCHAR(255) NOT NULL,
-          DESCRIPTION VARCHAR(255),
-          SUBMITTED_DATE TIMESTAMP DEFAULT CURRENT TIMESTAMP,
-          EXECUTION_USER VARCHAR(255),
-          GATEWAY_NAME VARCHAR(255),
-          PROJECT_NAME VARCHAR(255),
-          SHARE_EXPERIMENT SMALLINT,
-          PRIMARY KEY (EXPERIMENT_ID),
-          FOREIGN KEY (GATEWAY_NAME) REFERENCES GATEWAY(GATEWAY_NAME) ON DELETE CASCADE,
-          FOREIGN KEY (PROJECT_NAME) REFERENCES PROJECT(PROJECT_NAME) ON DELETE CASCADE
-);
-
-CREATE TABLE EXPERIMENT_SUMMARY
-(
-          EXPERIMENT_ID VARCHAR(255) NOT NULL,
-          STATUS VARCHAR(255),
-          LAST_UPDATED_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
-          PRIMARY KEY(EXPERIMENT_ID),
-          FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT_METADATA(EXPERIMENT_ID) ON DELETE
CASCADE
-);
-
-CREATE TABLE EXPERIMENT_CONFIGURATION_DATA
-(
-          EXPERIMENT_ID VARCHAR(255) NOT NULL,
-          APPLICATION_ID VARCHAR(255),
-          APPLICATION_VERSION VARCHAR(255),
-          WORKFLOW_TEMPLATE_ID VARCHAR(255),
-          WORKFLOW_TEMPLATE_VERSION VARCHAR(255),
-          RESOURCE_HOST_ID VARCHAR (255),
-          TOTAL_CPU_COUNT INTEGER,
-          NODE_COUNT INTEGER,
-          NUMBER_OF_THREADS INTEGER,
-          QUEUE_NAME VARCHAR (255),
-          WALLTIME_LIMIT INTEGER,
-          JOB_START_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
-          TOTAL_PHYSICAL_MEMORY INTEGER,
-          COMPUTATIONAL_PROJECT_ACCOUNT VARCHAR(255),
-          AIRAVATA_AUTO_SCHEDULE SMALLINT,
-          OVERRIDE_MANUAL_SCHEDULE_PARAMS SMALLINT,
-          WORKING_DIR_PARENT VARCHAR(255),
-          UNIQUE_WORKING_DIR VARCHAR(255),
-          STAGE_INPUT_FILES_TO_WORKING_DIR SMALLINT,
-          OUTPUT_DATA_DIR VARCHAR(255),
-          DATA_REG_URL VARCHAR (255),
-          PERSIST_OUTPUT_DATA SMALLINT,
-          CLEAN_AFTER_JOB SMALLINT,
-          START_EXECUTION_AT VARCHAR(255),
-          EXECUTE_BEFORE VARCHAR(255),
-          NUMBER_OF_RETRIES INTEGER,
-          EXPERIMENT_CONFIG_DATA BLOB,
-          PRIMARY KEY (EXPERIMENT_ID),
-          FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT_METADATA(EXPERIMENT_ID) ON DELETE
CASCADE
-);
-
-CREATE TABLE EXPERIMENT_INPUT
-(
-        EXPERIMENT_ID VARCHAR(255) NOT NULL,
-        EX_KEY VARCHAR (255) NOT NULL,
-        VALUE VARCHAR (255),
-        PRIMARY KEY (EXPERIMENT_ID, EX_KEY),
-        FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT_METADATA(EXPERIMENT_ID) ON DELETE
CASCADE
-);
-
-CREATE TABLE EXPERIMENT_OUTPUT
-(
-        EXPERIMENT_ID VARCHAR(255) NOT NULL,
-        EX_KEY VARCHAR (255) NOT NULL,
-        VALUE VARCHAR (255),
-        PRIMARY KEY (EXPERIMENT_ID, EX_KEY),
-        FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT_METADATA(EXPERIMENT_ID) ON DELETE
CASCADE
-);
-
-CREATE TABLE WORKFLOW_DATA
-(
-       EXPERIMENT_ID VARCHAR(255),
-       WORKFLOW_INSTANCE_ID VARCHAR(255),
-       TEMPLATE_NAME VARCHAR(255),
-       STATUS VARCHAR(255),
-       START_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
-       LAST_UPDATE_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
-       PRIMARY KEY(WORKFLOW_INSTANCE_ID),
-       FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT_METADATA(EXPERIMENT_ID) ON DELETE
CASCADE
-);
-
-CREATE TABLE NODE_DATA
-(
-       WORKFLOW_INSTANCE_ID VARCHAR(255),
-       NODE_ID VARCHAR(255),
-       NODE_TYPE VARCHAR(255),
-       INPUTS BLOB,
-       OUTPUTS BLOB,
-       STATUS VARCHAR(255),
-       START_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
-       LAST_UPDATE_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
-       EXECUTION_INDEX INTEGER NOT NULL,
-       PRIMARY KEY(WORKFLOW_INSTANCE_ID, NODE_ID, EXECUTION_INDEX),
-       FOREIGN KEY (WORKFLOW_INSTANCE_ID) REFERENCES WORKFLOW_DATA(WORKFLOW_INSTANCE_ID)
ON DELETE CASCADE
-);
-
--- need to remove this in future
-CREATE TABLE GRAM_DATA
-(
-       WORKFLOW_INSTANCE_ID VARCHAR(255),
-       NODE_ID VARCHAR(255),
-       RSL BLOB,
-       INVOKED_HOST VARCHAR(255),
-       LOCAL_JOB_ID VARCHAR(255),
-       PRIMARY KEY(WORKFLOW_INSTANCE_ID, NODE_ID),
-       FOREIGN KEY (WORKFLOW_INSTANCE_ID) REFERENCES WORKFLOW_DATA(WORKFLOW_INSTANCE_ID)
ON DELETE CASCADE
-);
-
-CREATE TABLE GFAC_JOB_DATA
-(
-       EXPERIMENT_ID VARCHAR(255),
-       WORKFLOW_INSTANCE_ID VARCHAR(255),
-       NODE_ID VARCHAR(255),
-       APPLICATION_DESC_ID VARCHAR(255),
-       HOST_DESC_ID VARCHAR(255),
-       SERVICE_DESC_ID VARCHAR(255),
-       JOB_DATA CLOB,
-       LOCAL_JOB_ID VARCHAR(255) NOT NULL,
-       SUBMITTED_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
-       STATUS_UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
-       STATUS VARCHAR(255),
-       METADATA CLOB,
-       PRIMARY KEY(LOCAL_JOB_ID),
-       FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT_METADATA(EXPERIMENT_ID),
-       FOREIGN KEY (WORKFLOW_INSTANCE_ID) REFERENCES WORKFLOW_DATA(WORKFLOW_INSTANCE_ID)
-);
-
-CREATE TABLE GFAC_JOB_STATUS
-(
-       LOCAL_JOB_ID VARCHAR(255) NOT NULL,
-       STATUS_UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
-       STATUS VARCHAR(255),
-       FOREIGN KEY (LOCAL_JOB_ID) REFERENCES GFAC_JOB_DATA(LOCAL_JOB_ID)
-);
-
-
-CREATE TABLE COMMUNITY_USER
-(
-        GATEWAY_NAME VARCHAR(256) NOT NULL,
-        COMMUNITY_USER_NAME VARCHAR(256) NOT NULL,
-        TOKEN_ID VARCHAR(256) NOT NULL,
-        COMMUNITY_USER_EMAIL VARCHAR(256) NOT NULL,
-        PRIMARY KEY (GATEWAY_NAME, COMMUNITY_USER_NAME, TOKEN_ID)
-);
-
-
-CREATE TABLE CREDENTIALS
-(
-        GATEWAY_ID VARCHAR(256) NOT NULL,
-        TOKEN_ID VARCHAR(256) NOT NULL,
-        CREDENTIAL BLOB NOT NULL,
-        PORTAL_USER_ID VARCHAR(256) NOT NULL,
-        TIME_PERSISTED TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
-        PRIMARY KEY (GATEWAY_ID, TOKEN_ID)
-);
-
-CREATE TABLE EXECUTION_ERROR
-(
-       ERROR_ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY,
-       EXPERIMENT_ID VARCHAR(255),
-       WORKFLOW_INSTANCE_ID VARCHAR(255),
-       NODE_ID VARCHAR(255),
-       GFAC_JOB_ID VARCHAR(255),
-       SOURCE_TYPE VARCHAR(255),
-       ERROR_DATE TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
-       ERROR_MSG CLOB,
-       ERROR_DESC CLOB,
-       ERROR_CODE VARCHAR(255),
-       ERROR_REPORTER VARCHAR(255),
-       ERROR_LOCATION VARCHAR(255),
-       ACTION_TAKEN VARCHAR(255),
-       ERROR_REFERENCE INTEGER,
-       PRIMARY KEY(ERROR_ID),
-       FOREIGN KEY (WORKFLOW_INSTANCE_ID) REFERENCES WORKFLOW_DATA(WORKFLOW_INSTANCE_ID)
ON DELETE CASCADE,
-       FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT_METADATA(EXPERIMENT_ID) ON DELETE
CASCADE
-);
-
-CREATE TABLE ORCHESTRATOR
-(
-        EXPERIMENT_ID VARCHAR(255) NOT NULL,
-        USERNAME VARCHAR(255),
-        STATUS VARCHAR(255),
-        STATE VARCHAR(255),
-        GFAC_EPR VARCHAR(255),
-        APPLICATION_NAME VARCHAR(255),
-        JOBREQUEST CLOB,
-        SUBMITTED_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
-        STATUS_UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
-        PRIMARY KEY (EXPERIMENT_ID),
-        FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT_METADATA(EXPERIMENT_ID) ON DELETE
CASCADE
-);
-
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/7f4e406a/modules/orchestrator/orchestrator-core/src/test/resources/registry-derby.sql
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/test/resources/registry-derby.sql
b/modules/orchestrator/orchestrator-core/src/test/resources/registry-derby.sql
new file mode 100644
index 0000000..7b8fb39
--- /dev/null
+++ b/modules/orchestrator/orchestrator-core/src/test/resources/registry-derby.sql
@@ -0,0 +1,380 @@
+/*
+ *
+ * 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.
+ *
+ */
+CREATE TABLE GATEWAY
+(
+        GATEWAY_NAME VARCHAR(255),
+	    OWNER VARCHAR(255),
+        PRIMARY KEY (GATEWAY_NAME)
+);
+
+CREATE TABLE CONFIGURATION
+(
+        CONFIG_KEY VARCHAR(255),
+        CONFIG_VAL VARCHAR(255),
+        EXPIRE_DATE TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+        CATEGORY_ID VARCHAR (255),
+        PRIMARY KEY(CONFIG_KEY, CONFIG_VAL, CATEGORY_ID)
+);
+
+INSERT INTO CONFIGURATION (CONFIG_KEY, CONFIG_VAL, EXPIRE_DATE, CATEGORY_ID) VALUES('registry.version',
'0.12', CURRENT_TIMESTAMP ,'SYSTEM');
+
+CREATE TABLE USERS
+(
+        USER_NAME VARCHAR(255),
+        PASSWORD VARCHAR(255),
+        PRIMARY KEY(USER_NAME)
+);
+
+CREATE TABLE GATEWAY_WORKER
+(
+        GATEWAY_NAME VARCHAR(255),
+        USER_NAME VARCHAR(255),
+        PRIMARY KEY (GATEWAY_NAME, USER_NAME),
+        FOREIGN KEY (GATEWAY_NAME) REFERENCES GATEWAY(GATEWAY_NAME) ON DELETE CASCADE,
+        FOREIGN KEY (USER_NAME) REFERENCES USERS(USER_NAME) ON DELETE CASCADE
+);
+
+CREATE TABLE PROJECT
+(
+         GATEWAY_NAME VARCHAR(255),
+         USER_NAME VARCHAR(255),
+         PROJECT_NAME VARCHAR(255),
+         PRIMARY KEY (PROJECT_NAME),
+         FOREIGN KEY (GATEWAY_NAME) REFERENCES GATEWAY(GATEWAY_NAME) ON DELETE CASCADE,
+         FOREIGN KEY (USER_NAME) REFERENCES USERS(USER_NAME) ON DELETE CASCADE
+);
+
+CREATE TABLE PUBLISHED_WORKFLOW
+(
+         GATEWAY_NAME VARCHAR(255),
+         CREATED_USER VARCHAR(255),
+         PUBLISH_WORKFLOW_NAME VARCHAR(255),
+         VERSION VARCHAR(255),
+         PUBLISHED_DATE TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+         PATH VARCHAR (255),
+         WORKFLOW_CONTENT BLOB,
+         PRIMARY KEY(GATEWAY_NAME, PUBLISH_WORKFLOW_NAME),
+         FOREIGN KEY (GATEWAY_NAME) REFERENCES GATEWAY(GATEWAY_NAME) ON DELETE CASCADE,
+         FOREIGN KEY (CREATED_USER) REFERENCES USERS(USER_NAME) ON DELETE CASCADE
+);
+
+CREATE TABLE USER_WORKFLOW
+(
+         GATEWAY_NAME VARCHAR(255),
+         OWNER VARCHAR(255),
+         TEMPLATE_NAME VARCHAR(255),
+         LAST_UPDATED_TIME TIMESTAMP DEFAULT CURRENT TIMESTAMP,
+         PATH VARCHAR (255),
+         WORKFLOW_GRAPH BLOB,
+         PRIMARY KEY(GATEWAY_NAME, OWNER, TEMPLATE_NAME),
+         FOREIGN KEY (GATEWAY_NAME) REFERENCES GATEWAY(GATEWAY_NAME) ON DELETE CASCADE,
+         FOREIGN KEY (OWNER) REFERENCES USERS(USER_NAME) ON DELETE CASCADE
+);
+
+CREATE TABLE HOST_DESCRIPTOR
+(
+         GATEWAY_NAME VARCHAR(255),
+         UPDATED_USER VARCHAR(255),
+         HOST_DESCRIPTOR_ID VARCHAR(255),
+         HOST_DESCRIPTOR_XML BLOB,
+         PRIMARY KEY(GATEWAY_NAME, HOST_DESCRIPTOR_ID),
+         FOREIGN KEY (GATEWAY_NAME) REFERENCES GATEWAY(GATEWAY_NAME) ON DELETE CASCADE,
+         FOREIGN KEY (UPDATED_USER) REFERENCES USERS(USER_NAME) ON DELETE CASCADE
+);
+
+CREATE TABLE SERVICE_DESCRIPTOR
+(
+         GATEWAY_NAME VARCHAR(255),
+         UPDATED_USER VARCHAR(255),
+         SERVICE_DESCRIPTOR_ID VARCHAR(255),
+         SERVICE_DESCRIPTOR_XML BLOB,
+         PRIMARY KEY(GATEWAY_NAME,SERVICE_DESCRIPTOR_ID),
+         FOREIGN KEY (GATEWAY_NAME) REFERENCES GATEWAY(GATEWAY_NAME) ON DELETE CASCADE,
+         FOREIGN KEY (UPDATED_USER) REFERENCES USERS(USER_NAME) ON DELETE CASCADE
+);
+
+CREATE TABLE APPLICATION_DESCRIPTOR
+(
+         GATEWAY_NAME VARCHAR(255),
+         UPDATED_USER VARCHAR(255),
+         APPLICATION_DESCRIPTOR_ID VARCHAR(255),
+         HOST_DESCRIPTOR_ID VARCHAR(255),
+         SERVICE_DESCRIPTOR_ID VARCHAR(255),
+         APPLICATION_DESCRIPTOR_XML BLOB,
+         PRIMARY KEY(GATEWAY_NAME,APPLICATION_DESCRIPTOR_ID),
+         FOREIGN KEY (GATEWAY_NAME) REFERENCES GATEWAY(GATEWAY_NAME) ON DELETE CASCADE,
+         FOREIGN KEY (UPDATED_USER) REFERENCES USERS(USER_NAME) ON DELETE CASCADE
+);
+
+CREATE TABLE EXPERIMENT
+(
+        EXPERIMENT_ID VARCHAR(255),
+        GATEWAY_NAME VARCHAR(255),
+        EXECUTION_USER VARCHAR(255),
+        PROJECT_NAME VARCHAR(255),
+        CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+        EXPERIMENT_NAME VARCHAR(255),
+        EXPERIMENT_DESCRIPTION VARCHAR(255),
+        APPLICATION_ID VARCHAR(255),
+        APPLICATION_VERSION VARCHAR(255),
+        WORKFLOW_TEMPLATE_ID VARCHAR(255),
+        WORKFLOW_TEMPLATE_VERSION VARCHAR(255),
+        WORKFLOW_EXECUTION_ID VARCHAR(255),
+        PRIMARY KEY(EXPERIMENT_ID),
+        FOREIGN KEY (GATEWAY_NAME) REFERENCES GATEWAY(GATEWAY_NAME) ON DELETE CASCADE,
+        FOREIGN KEY (PROJECT_NAME) REFERENCES PROJECT(PROJECT_NAME) ON DELETE CASCADE
+);
+
+CREATE TABLE EXPERIMENT_INPUT
+(
+        EXPERIMENT_ID VARCHAR(255),
+        INPUT_KEY VARCHAR(255),
+        INPUT_TYPE VARCHAR(255),
+        METADATA VARCHAR(255),
+        VALUE VARCHAR(255),
+        PRIMARY KEY(EXPERIMENT_ID,INPUT_KEY),
+        FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE EXPERIMENT_OUTPUT
+(
+        EXPERIMENT_ID VARCHAR(255),
+        OUTPUT_KEY VARCHAR(255),
+        OUTPUT_KEY_TYPE VARCHAR(255),
+        METADATA VARCHAR(255),
+        VALUE VARCHAR(255),
+        PRIMARY KEY(EXPERIMENT_ID,OUTPUT_KEY),
+        FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE
+);
+
+
+CREATE TABLE WORKFLOW_NODE_DETAIL
+(
+        EXPERIMENT_ID VARCHAR(255),
+        NODE_INSTANCE_ID VARCHAR(255),
+        CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+        NODE_NAME VARCHAR(255),
+        PRIMARY KEY(NODE_INSTANCE_ID),
+        FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE TASK_DETAIL
+(
+        TASK_ID VARCHAR(255),
+        NODE_INSTANCE_ID VARCHAR(255),
+        CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+        APPLICATION_ID VARCHAR(255),
+        APPLICATION_VERSION VARCHAR(255),
+        PRIMARY KEY(TASK_ID),
+        FOREIGN KEY (NODE_INSTANCE_ID) REFERENCES WORKFLOW_NODE_DETAIL(NODE_INSTANCE_ID)
ON DELETE CASCADE
+);
+
+CREATE TABLE ERROR_DETAIL
+(
+         ERROR_ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY,
+         EXPERIMENT_ID VARCHAR(255),
+         TASK_ID VARCHAR(255),
+         NODE_INSTANCE_ID VARCHAR(255),
+         JOB_ID VARCHAR(255),
+         CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+         ACTUAL_ERROR_MESSAGE CLOB,
+         USER_FRIEDNLY_ERROR_MSG VARCHAR(255),
+         TRANSIENT_OR_PERSISTENT SMALLINT,
+         ERROR_CATEGORY VARCHAR(255),
+         CORRECTIVE_ACTION VARCHAR(255),
+         ACTIONABLE_GROUP VARCHAR(255),
+         PRIMARY KEY(ERROR_ID),
+         FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE,
+         FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE,
+         FOREIGN KEY (NODE_INSTANCE_ID) REFERENCES WORKFLOW_NODE_DETAIL(NODE_INSTANCE_ID)
ON DELETE CASCADE
+);
+
+CREATE TABLE APPLICATION_INPUT
+(
+        TASK_ID VARCHAR(255),
+        INPUT_KEY VARCHAR(255),
+        INPUT_KEY_TYPE VARCHAR(255),
+        METADATA VARCHAR(255),
+        VALUE VARCHAR(255),
+        PRIMARY KEY(TASK_ID,INPUT_KEY),
+        FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE APPLICATION_OUTPUT
+(
+        TASK_ID VARCHAR(255),
+        OUTPUT_KEY VARCHAR(255),
+        OUTPUT_KEY_TYPE VARCHAR(255),
+        METADATA VARCHAR(255),
+        VALUE VARCHAR(255),
+        PRIMARY KEY(TASK_ID,OUTPUT_KEY),
+        FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE NODE_INPUT
+(
+       NODE_INSTANCE_ID VARCHAR(255),
+       INPUT_KEY VARCHAR(255),
+       INPUT_KEY_TYPE VARCHAR(255),
+       METADATA VARCHAR(255),
+       VALUE VARCHAR(255),
+       PRIMARY KEY(NODE_INSTANCE_ID,INPUT_KEY),
+       FOREIGN KEY (NODE_INSTANCE_ID) REFERENCES WORKFLOW_NODE_DETAIL(NODE_INSTANCE_ID) ON
DELETE CASCADE
+);
+
+CREATE TABLE NODE_OUTPUT
+(
+       NODE_INSTANCE_ID VARCHAR(255),
+       OUTPUT_KEY VARCHAR(255),
+       OUTPUT_KEY_TYPE VARCHAR(255),
+       METADATA VARCHAR(255),
+       VALUE VARCHAR(255),
+       PRIMARY KEY(NODE_INSTANCE_ID,OUTPUT_KEY),
+       FOREIGN KEY (NODE_INSTANCE_ID) REFERENCES WORKFLOW_NODE_DETAIL(NODE_INSTANCE_ID) ON
DELETE CASCADE
+);
+
+CREATE TABLE JOB_DETAIL
+(
+        JOB_ID VARCHAR(255),
+        TASK_ID VARCHAR(255),
+        JOB_DESCRIPTION VARCHAR(255),
+        CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+        COMPUTE_RESOURCE_CONSUMED VARCHAR(255),
+        PRIMARY KEY (TASK_ID, JOB_ID),
+        FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE DATA_TRANSFER_DETAIL
+(
+        TRANSFER_ID VARCHAR(255),
+        TASK_ID VARCHAR(255),
+        CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+        TRANSFER_DESC VARCHAR(255),
+        PRIMARY KEY(TRANSFER_ID),
+        FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE STATUS
+(
+        STATUS_ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY,
+        EXPERIMENT_ID VARCHAR(255),
+        NODE_INSTANCE_ID VARCHAR(255),
+        TRANSFER_ID VARCHAR(255),
+        TASK_ID VARCHAR(255),
+        JOB_ID VARCHAR(255),
+        STATE VARCHAR(255),
+        STATUS_UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+        STATUS_TYPE VARCHAR(255),
+        PRIMARY KEY(STATUS_ID),
+        FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE,
+        FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE,
+        FOREIGN KEY (NODE_INSTANCE_ID) REFERENCES WORKFLOW_NODE_DETAIL(NODE_INSTANCE_ID)
ON DELETE CASCADE,
+        FOREIGN KEY (TRANSFER_ID) REFERENCES DATA_TRANSFER_DETAIL(TRANSFER_ID) ON DELETE
CASCADE
+);
+
+CREATE TABLE CONFIG_DATA
+(
+        EXPERIMENT_ID VARCHAR(255),
+        AIRAVATA_AUTO_SCHEDULE SMALLINT,
+        OVERRIDE_MANUAL_SCHEDULE_PARAMS SMALLINT,
+        SHARE_EXPERIMENT SMALLINT,
+        PRIMARY KEY(EXPERIMENT_ID)
+);
+
+CREATE TABLE COMPUTATIONAL_RESOURCE_SCHEDULING
+(
+        RESOURCE_SCHEDULING_ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY,
+        EXPERIMENT_ID VARCHAR(255),
+        TASK_ID VARCHAR(255),
+        RESOURCE_HOST_ID VARCHAR(255),
+        CPU_COUNT INTEGER,
+        NODE_COUNT INTEGER,
+        NO_OF_THREADS INTEGER,
+        QUEUE_NAME VARCHAR(255),
+        WALLTIME_LIMIT INTEGER,
+        JOB_START_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+        TOTAL_PHYSICAL_MEMORY INTEGER,
+        COMPUTATIONAL_PROJECT_ACCOUNT VARCHAR(255),
+        PRIMARY KEY(RESOURCE_SCHEDULING_ID),
+        FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE,
+        FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE ADVANCE_INPUT_DATA_HANDLING
+(
+       INPUT_DATA_HANDLING_ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY,
+       EXPERIMENT_ID VARCHAR(255),
+       TASK_ID VARCHAR(255),
+       WORKING_DIR_PARENT VARCHAR(255),
+       UNIQUE_WORKING_DIR VARCHAR(255),
+       STAGE_INPUT_FILES_TO_WORKING_DIR SMALLINT,
+       CLEAN_AFTER_JOB SMALLINT,
+       PRIMARY KEY(INPUT_DATA_HANDLING_ID),
+       FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE,
+       FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE ADVANCE_OUTPUT_DATA_HANDLING
+(
+       OUTPUT_DATA_HANDLING_ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY,
+       EXPERIMENT_ID VARCHAR(255),
+       TASK_ID VARCHAR(255),
+       OUTPUT_DATA_DIR VARCHAR(255),
+       DATA_REG_URL VARCHAR (255),
+       PERSIST_OUTPUT_DATA SMALLINT,
+       PRIMARY KEY(OUTPUT_DATA_HANDLING_ID),
+       FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE,
+       FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE QOS_PARAM
+(
+        QOS_ID INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY,
+        EXPERIMENT_ID VARCHAR(255),
+        TASK_ID VARCHAR(255),
+        START_EXECUTION_AT VARCHAR(255),
+        EXECUTE_BEFORE VARCHAR(255),
+        NO_OF_RETRIES INTEGER,
+        PRIMARY KEY(QOS_ID),
+        FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE,
+        FOREIGN KEY (TASK_ID) REFERENCES TASK_DETAIL(TASK_ID) ON DELETE CASCADE
+);
+
+CREATE TABLE COMMUNITY_USER
+(
+        GATEWAY_NAME VARCHAR(256) NOT NULL,
+        COMMUNITY_USER_NAME VARCHAR(256) NOT NULL,
+        TOKEN_ID VARCHAR(256) NOT NULL,
+        COMMUNITY_USER_EMAIL VARCHAR(256) NOT NULL,
+        PRIMARY KEY (GATEWAY_NAME, COMMUNITY_USER_NAME, TOKEN_ID)
+);
+
+CREATE TABLE CREDENTIALS
+(
+        GATEWAY_ID VARCHAR(256) NOT NULL,
+        TOKEN_ID VARCHAR(256) NOT NULL,
+        CREDENTIAL BLOB NOT NULL,
+        PORTAL_USER_ID VARCHAR(256) NOT NULL,
+        TIME_PERSISTED TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+        PRIMARY KEY (GATEWAY_ID, TOKEN_ID)
+);
+
+


Mime
View raw message