You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by to...@apache.org on 2014/10/16 21:40:38 UTC
git commit: Moved create index down to cache init. Not ideal,
but lowest least called point in the code until setup is refactored.
Repository: incubator-usergrid
Updated Branches:
refs/heads/index-rebuild 163fa9adf -> f24f3ea7c
Moved create index down to cache init. Not ideal, but lowest least called point in the code until setup is refactored.
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/f24f3ea7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/f24f3ea7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/f24f3ea7
Branch: refs/heads/index-rebuild
Commit: f24f3ea7cc70efa18de83308d4eb9011548517e4
Parents: 163fa9a
Author: Todd Nine <to...@apache.org>
Authored: Thu Oct 16 13:40:32 2014 -0600
Committer: Todd Nine <to...@apache.org>
Committed: Thu Oct 16 13:40:32 2014 -0600
----------------------------------------------------------------------
.../apache/usergrid/corepersistence/CpEntityManagerFactory.java | 3 +--
stack/core/src/test/java/org/apache/usergrid/CoreApplication.java | 2 --
2 files changed, 1 insertion(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/f24f3ea7/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 8ab0b7f..2514e20 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
@@ -146,7 +146,6 @@ public class CpEntityManagerFactory implements EntityManagerFactory, Application
Map sysAppProps = new HashMap<String, Object>();
sysAppProps.put( PROPERTY_NAME, "systemapp");
em.create( SYSTEM_APP_ID, TYPE_APPLICATION, sysAppProps );
- em.createIndex();
em.getApplication();
em.refreshIndex();
}
@@ -287,7 +286,7 @@ public class CpEntityManagerFactory implements EntityManagerFactory, Application
EntityManager appEm = getEntityManager( applicationId );
//create our ES index since we're initializing this application
- appEm.createIndex();
+// TODO T.N, pushed this down into the cache load appEm.createIndex();
appEm.create( applicationId, TYPE_APPLICATION, properties );
appEm.resetRoles();
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/f24f3ea7/stack/core/src/test/java/org/apache/usergrid/CoreApplication.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/CoreApplication.java b/stack/core/src/test/java/org/apache/usergrid/CoreApplication.java
index 51e825b..fd8ca9b 100644
--- a/stack/core/src/test/java/org/apache/usergrid/CoreApplication.java
+++ b/stack/core/src/test/java/org/apache/usergrid/CoreApplication.java
@@ -150,9 +150,7 @@ public class CoreApplication implements Application, TestRule {
id = setup.createApplication( orgName, appName );
assertNotNull( id );
- setup.getEmf().refreshIndex();
em = setup.getEmf().getEntityManager( id );
- em.createIndex();
assertNotNull( em );
LOG.info( "Created new application {} in organization {}", appName, orgName );