usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sfeld...@apache.org
Subject [21/25] incubator-usergrid git commit: Fixes migration plugin to use new scope
Date Wed, 01 Apr 2015 20:44:56 GMT
Fixes migration plugin to use new scope


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

Branch: refs/heads/two-dot-o-dev
Commit: ed114b498a6e59b685ff57c4ed364f35fc080648
Parents: 86dff76
Author: Todd Nine <tnine@apigee.com>
Authored: Tue Mar 31 16:57:40 2015 -0600
Committer: Todd Nine <tnine@apigee.com>
Committed: Tue Mar 31 16:57:40 2015 -0600

----------------------------------------------------------------------
 .../corepersistence/CpEntityManagerFactory.java       |  7 ++-----
 .../migration/AppInfoMigrationPlugin.java             | 14 ++------------
 2 files changed, 4 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ed114b49/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java
b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java
index 15fb386..426201f 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java
@@ -431,15 +431,12 @@ public class CpEntityManagerFactory implements EntityManagerFactory,
Application
         Application app = em.getApplication();
         Id fromEntityId = new SimpleId( app.getUuid(), app.getType() );
 
-//        final String scopeName;
         final String edgeType;
 
         if ( deleted ) {
-            edgeType = CpNamingUtils.getEdgeTypeFromCollectionName( CpNamingUtils.DELETED_APPINFOS
);
-//            scopeName = CpNamingUtils.getCollectionScopeNameFromCollectionName(CpNamingUtils.DELETED_APPINFOS);
+            edgeType = CpNamingUtils.getEdgeTypeFromCollectionName( CpNamingUtils.DELETED_APPLICATION_INFO
);
         } else {
-            edgeType = CpNamingUtils.getEdgeTypeFromCollectionName( CpNamingUtils.APPINFOS
);
-//            scopeName = CpNamingUtils.getCollectionScopeNameFromCollectionName(CpNamingUtils.APPINFOS);
+            edgeType = CpNamingUtils.getEdgeTypeFromCollectionName( CpNamingUtils.APPLICATION_INFOS
);
         }
 
         logger.debug("getApplications(): Loading edges of edgeType {} from {}:{}",

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ed114b49/stack/core/src/main/java/org/apache/usergrid/corepersistence/migration/AppInfoMigrationPlugin.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/migration/AppInfoMigrationPlugin.java
b/stack/core/src/main/java/org/apache/usergrid/corepersistence/migration/AppInfoMigrationPlugin.java
index c0f3f15..53ffe79 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/migration/AppInfoMigrationPlugin.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/migration/AppInfoMigrationPlugin.java
@@ -23,10 +23,8 @@ import org.apache.usergrid.corepersistence.util.CpEntityMapUtils;
 import org.apache.usergrid.corepersistence.util.CpNamingUtils;
 import org.apache.usergrid.persistence.*;
 import org.apache.usergrid.persistence.Entity;
-import org.apache.usergrid.persistence.collection.CollectionScope;
 import org.apache.usergrid.persistence.collection.EntityCollectionManager;
 import org.apache.usergrid.persistence.collection.EntityCollectionManagerFactory;
-import org.apache.usergrid.persistence.collection.impl.CollectionScopeImpl;
 import org.apache.usergrid.persistence.core.migration.data.MigrationInfoSerialization;
 import org.apache.usergrid.persistence.core.migration.data.MigrationPlugin;
 import org.apache.usergrid.persistence.core.migration.data.PluginPhase;
@@ -219,12 +217,8 @@ public class AppInfoMigrationPlugin implements MigrationPlugin {
 
         final ApplicationScope appScope = getApplicationScope( emf.getManagementAppId() );
 
-        final CollectionScope appInfoCollectionScope =
-            new CollectionScopeImpl( appScope.getApplication(), appScope.getApplication(),
-                CpNamingUtils.getCollectionScopeNameFromCollectionName( CpNamingUtils.APPLICATION_INFOS
));
-
         final EntityCollectionManager collectionManager =
-            entityCollectionManagerFactory.createCollectionManager( appInfoCollectionScope
);
+            entityCollectionManagerFactory.createCollectionManager( appScope );
 
         final GraphManager gm = graphManagerFactory.createEdgeManager(appScope);
 
@@ -299,12 +293,8 @@ public class AppInfoMigrationPlugin implements MigrationPlugin {
 
         final ApplicationScope appScope = getApplicationScope( CpNamingUtils.SYSTEM_APP_ID
);
 
-        final CollectionScope appInfoCollectionScope =
-            new CollectionScopeImpl( appScope.getApplication(), appScope.getApplication(),
-                CpNamingUtils.getCollectionScopeNameFromCollectionName( "appinfos" ));
-
         final EntityCollectionManager collectionManager =
-            entityCollectionManagerFactory.createCollectionManager( appInfoCollectionScope
);
+            entityCollectionManagerFactory.createCollectionManager( appScope );
 
         final GraphManager gm = graphManagerFactory.createEdgeManager(appScope);
 


Mime
View raw message