You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ch...@apache.org on 2015/06/05 21:33:57 UTC

[1/2] airavata git commit: more changes to registry refactoring

Repository: airavata
Updated Branches:
  refs/heads/master de8487878 -> 1ba83f11f


more changes to registry refactoring


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

Branch: refs/heads/master
Commit: f8379196dfb119e184f78e8abfcfac71a4b7a447
Parents: b393df5
Author: Chathuri Wimalasena <ch...@apache.org>
Authored: Fri Jun 5 15:33:25 2015 -0400
Committer: Chathuri Wimalasena <ch...@apache.org>
Committed: Fri Jun 5 15:33:25 2015 -0400

----------------------------------------------------------------------
 .../airavata/api/server/util/RegistryInitUtil.java     |  2 +-
 .../orchestrator/core/context/OrchestratorContext.java |  1 -
 .../orchestrator/cpi/impl/AbstractOrchestrator.java    |  4 ++--
 .../orchestrator/cpi/impl/SimpleOrchestratorImpl.java  | 13 +++++--------
 modules/workflow/workflow-core/pom.xml                 |  5 -----
 .../ui/dialogs/registry/NewRegistryUserDialog.java     |  4 ++--
 6 files changed, 10 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/f8379196/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/util/RegistryInitUtil.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/util/RegistryInitUtil.java b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/util/RegistryInitUtil.java
index b540f41..49afdc7 100644
--- a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/util/RegistryInitUtil.java
+++ b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/util/RegistryInitUtil.java
@@ -78,7 +78,7 @@ public class RegistryInitUtil {
         try {
             conn = db.connect();
             if (!DatabaseCreator.isDatabaseStructureCreated(CONFIGURATION_TABLE, conn)) {
-                DatabaseCreator.createRegistryDatabase("database_scripts/registry", conn);
+                DatabaseCreator.createRegistryDatabase("database_scripts/expcatalog", conn);
                 logger.info("New Database created for Registry");
             } else {
                 logger.info("Database already created for Registry!");

http://git-wip-us.apache.org/repos/asf/airavata/blob/f8379196/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/context/OrchestratorContext.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/context/OrchestratorContext.java b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/context/OrchestratorContext.java
index f7f5969..99f5367 100644
--- a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/context/OrchestratorContext.java
+++ b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/core/context/OrchestratorContext.java
@@ -27,7 +27,6 @@ import org.apache.airavata.gfac.client.GFACInstance;
 import org.apache.airavata.messaging.core.Publisher;
 import org.apache.airavata.orchestrator.core.OrchestratorConfiguration;
 import org.apache.airavata.registry.cpi.Registry;
-import org.apache.zookeeper.ZooKeeper;
 
 /**
  * This is the context object used in orchestrator which

http://git-wip-us.apache.org/repos/asf/airavata/blob/f8379196/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/AbstractOrchestrator.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/AbstractOrchestrator.java b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/AbstractOrchestrator.java
index b72aba2..52b7b54 100644
--- a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/AbstractOrchestrator.java
+++ b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/AbstractOrchestrator.java
@@ -27,7 +27,7 @@ import org.apache.airavata.orchestrator.core.context.OrchestratorContext;
 import org.apache.airavata.orchestrator.core.exception.OrchestratorException;
 import org.apache.airavata.orchestrator.core.utils.OrchestratorUtils;
 import org.apache.airavata.orchestrator.cpi.Orchestrator;
-import org.apache.airavata.registry.core.experiment.catalog.impl.RegistryImpl;
+import org.apache.airavata.registry.core.experiment.catalog.impl.RegistryFactory;
 import org.apache.airavata.registry.cpi.RegistryException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -99,7 +99,7 @@ public abstract class AbstractOrchestrator implements Orchestrator {
 //            orchestratorContext.setRegistry(airavataRegistry);
 
             /* initializing registry cpi */
-            orchestratorContext.setNewRegistry(new RegistryImpl());
+            orchestratorContext.setNewRegistry(RegistryFactory.getRegistry());
         }  catch (IOException e) {
             logger.error("Failed to initializing Orchestrator - Error parsing configuration files");
             OrchestratorException orchestratorException = new OrchestratorException(e);

http://git-wip-us.apache.org/repos/asf/airavata/blob/f8379196/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java
index 66ae987..fe4e367 100644
--- a/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java
+++ b/modules/orchestrator/orchestrator-core/src/main/java/org/apache/airavata/orchestrator/cpi/impl/SimpleOrchestratorImpl.java
@@ -29,10 +29,7 @@ import org.apache.airavata.orchestrator.core.exception.OrchestratorException;
 import org.apache.airavata.orchestrator.core.impl.GFACPassiveJobSubmitter;
 import org.apache.airavata.orchestrator.core.job.JobSubmitter;
 import org.apache.airavata.orchestrator.core.validator.JobMetadataValidator;
-import org.apache.airavata.registry.cpi.ChildDataType;
-import org.apache.airavata.registry.cpi.Registry;
-import org.apache.airavata.registry.cpi.RegistryException;
-import org.apache.airavata.registry.cpi.RegistryModelType;
+import org.apache.airavata.registry.cpi.*;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -93,7 +90,7 @@ public class SimpleOrchestratorImpl extends AbstractOrchestrator{
         List<TaskDetails> tasks = new ArrayList<TaskDetails>();
         try {
             Registry newRegistry = orchestratorContext.getNewRegistry();
-            experiment = (Experiment) newRegistry.get(RegistryModelType.EXPERIMENT, experimentId);
+            experiment = (Experiment) newRegistry.getExperimentCatalog().get(ExperimentCatalogModelType.EXPERIMENT, experimentId);
             List<WorkflowNodeDetails> workflowNodeDetailsList = experiment.getWorkflowNodeDetailsList();
             if (workflowNodeDetailsList != null && !workflowNodeDetailsList.isEmpty()){
                 for (WorkflowNodeDetails wfn : workflowNodeDetailsList){
@@ -104,10 +101,10 @@ public class SimpleOrchestratorImpl extends AbstractOrchestrator{
                 }
             }else {
                 WorkflowNodeDetails iDontNeedaNode = ExperimentModelUtil.createWorkflowNode("tempNode", null);
-                String nodeID = (String) newRegistry.add(ChildDataType.WORKFLOW_NODE_DETAIL, iDontNeedaNode, experimentId);
+                String nodeID = (String) newRegistry.getExperimentCatalog().add(ExpCatChildDataType.WORKFLOW_NODE_DETAIL, iDontNeedaNode, experimentId);
 
                 TaskDetails taskDetails = ExperimentModelUtil.cloneTaskFromExperiment(experiment);
-                taskDetails.setTaskID((String) newRegistry.add(ChildDataType.TASK_DETAIL, taskDetails, nodeID));
+                taskDetails.setTaskID((String) newRegistry.getExperimentCatalog().add(ExpCatChildDataType.TASK_DETAIL, taskDetails, nodeID));
                 tasks.add(taskDetails);
             }
 
@@ -149,7 +146,7 @@ public class SimpleOrchestratorImpl extends AbstractOrchestrator{
                             details.setActionableGroup(ActionableGroup.GATEWAYS_ADMINS);
                             details.setCreationTime(Calendar.getInstance().getTimeInMillis());
                             details.setErrorCategory(ErrorCategory.APPLICATION_FAILURE);
-                            orchestratorContext.getNewRegistry().add(ChildDataType.ERROR_DETAIL, details,
+                            orchestratorContext.getNewRegistry().getExperimentCatalog().add(ExpCatChildDataType.ERROR_DETAIL, details,
                                     taskID.getTaskID());
                         } catch (RegistryException e) {
                             logger.error("Error while saving error details to registry", e);

http://git-wip-us.apache.org/repos/asf/airavata/blob/f8379196/modules/workflow/workflow-core/pom.xml
----------------------------------------------------------------------
diff --git a/modules/workflow/workflow-core/pom.xml b/modules/workflow/workflow-core/pom.xml
index 2aad114..31e0301 100644
--- a/modules/workflow/workflow-core/pom.xml
+++ b/modules/workflow/workflow-core/pom.xml
@@ -39,11 +39,6 @@
         </dependency>
         <dependency>
             <groupId>org.apache.airavata</groupId>
-            <artifactId>airavata-registry-data</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.airavata</groupId>
             <artifactId>airavata-registry-cpi</artifactId>
             <version>${project.version}</version>
         </dependency>

http://git-wip-us.apache.org/repos/asf/airavata/blob/f8379196/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/registry/NewRegistryUserDialog.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/registry/NewRegistryUserDialog.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/registry/NewRegistryUserDialog.java
index 092ba58..07f9f60 100644
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/registry/NewRegistryUserDialog.java
+++ b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/registry/NewRegistryUserDialog.java
@@ -27,8 +27,8 @@ import java.net.URL;
 
 import javax.swing.*;
 
+import org.apache.airavata.registry.core.experiment.catalog.ExpCatResourceUtils;
 import org.apache.airavata.registry.core.experiment.catalog.ResourceType;
-import org.apache.airavata.registry.core.experiment.catalog.ResourceUtils;
 import org.apache.airavata.registry.core.experiment.catalog.resources.GatewayResource;
 import org.apache.airavata.registry.core.experiment.catalog.resources.UserResource;
 import org.apache.airavata.registry.core.experiment.catalog.resources.WorkerResource;
@@ -111,7 +111,7 @@ public class NewRegistryUserDialog {
         if (status == null) {
             try {
 //                Properties properties = Utils.loadProperties();
-                GatewayResource gatewayResource = (GatewayResource)ResourceUtils.getGateway(getGatewayName());
+                GatewayResource gatewayResource = (GatewayResource) ExpCatResourceUtils.getGateway(getGatewayName());
                 UserResource userResource = (UserResource) gatewayResource.create(ResourceType.USER);
                 userResource.setUserName(getUsername());
                 userResource.setPassword(getPassword());


[2/2] airavata git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/airavata

Posted by ch...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/airavata


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

Branch: refs/heads/master
Commit: 1ba83f11f8bd0d5bda7bc1c6807e045774122a26
Parents: f837919 de84878
Author: Chathuri Wimalasena <ch...@apache.org>
Authored: Fri Jun 5 15:33:35 2015 -0400
Committer: Chathuri Wimalasena <ch...@apache.org>
Committed: Fri Jun 5 15:33:35 2015 -0400

----------------------------------------------------------------------
 distribution/src/main/assembly/bin-assembly.xml |  20 -
 .../gfac/bes/security/X509SecurityContext.java  |   2 +-
 .../gfac/core/AbstractSecurityContext.java      |  57 ---
 ...ava~30f9d70adbd9ee7dd6f7d3eccbfca4baf19b09fa | 475 -------------------
 .../airavata/gfac/core/JobDescriptor.java~HEAD  | 475 -------------------
 ...ava~30f9d70adbd9ee7dd6f7d3eccbfca4baf19b09fa |  52 --
 .../gfac/core/JobManagerConfiguration.java~HEAD |  52 --
 ...ava~30f9d70adbd9ee7dd6f7d3eccbfca4baf19b09fa |  34 --
 .../gfac/core/cluster/CommandInfo.java~HEAD     |  34 --
 ...ava~30f9d70adbd9ee7dd6f7d3eccbfca4baf19b09fa |  49 --
 .../gfac/core/cluster/CommandOutput.java~HEAD   |  49 --
 ...ava~30f9d70adbd9ee7dd6f7d3eccbfca4baf19b09fa |  65 ---
 .../gfac/core/cluster/ServerInfo.java~HEAD      |  65 ---
 .../core/context/AbstractSecurityContext.java   |  59 +++
 .../gsissh/security/GSISecurityContext.java     |   2 +-
 15 files changed, 61 insertions(+), 1429 deletions(-)
----------------------------------------------------------------------