You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by sf...@apache.org on 2015/02/11 18:13:15 UTC

[1/2] incubator-usergrid git commit: fixed null issue with index

Repository: incubator-usergrid
Updated Branches:
  refs/heads/USERGRID-365 ea680f1a0 -> 05db37f78


fixed null issue with index


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

Branch: refs/heads/USERGRID-365
Commit: 19231bb271a9e231fc4a08e055abc5dc2f8f391c
Parents: ea680f1
Author: Shawn Feldman <sf...@apache.org>
Authored: Wed Feb 11 09:41:14 2015 -0700
Committer: Shawn Feldman <sf...@apache.org>
Committed: Wed Feb 11 09:41:14 2015 -0700

----------------------------------------------------------------------
 .../usergrid/persistence/model/entity/MapToEntityConverter.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/19231bb2/stack/corepersistence/model/src/main/java/org/apache/usergrid/persistence/model/entity/MapToEntityConverter.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/model/src/main/java/org/apache/usergrid/persistence/model/entity/MapToEntityConverter.java b/stack/corepersistence/model/src/main/java/org/apache/usergrid/persistence/model/entity/MapToEntityConverter.java
index 21533e2..a40023a 100644
--- a/stack/corepersistence/model/src/main/java/org/apache/usergrid/persistence/model/entity/MapToEntityConverter.java
+++ b/stack/corepersistence/model/src/main/java/org/apache/usergrid/persistence/model/entity/MapToEntityConverter.java
@@ -21,7 +21,7 @@ public class MapToEntityConverter{
             Id id = entityMap.getId();
             UUID version = entityMap.getVersion();
             entityMap.clearFields();
-            entity = new Entity(id,version);
+            entity =  id!=null ? new Entity(id,version) : new Entity();
         }else{
             entity = new Entity();
         }


[2/2] incubator-usergrid git commit: remove observable

Posted by sf...@apache.org.
remove observable


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

Branch: refs/heads/USERGRID-365
Commit: 05db37f78dd861b71bb9133eef1cd2152b981b83
Parents: 19231bb
Author: Shawn Feldman <sf...@apache.org>
Authored: Wed Feb 11 10:13:05 2015 -0700
Committer: Shawn Feldman <sf...@apache.org>
Committed: Wed Feb 11 10:13:05 2015 -0700

----------------------------------------------------------------------
 .../corepersistence/CpEntityManagerFactory.java |  5 +-
 .../rx/EdgesFromSourceObservableIT.java         |  6 +-
 .../rx/EdgesToTargetObservableIT.java           | 10 +--
 .../mvcc/MvccEntityMigrationStrategy.java       |  2 +-
 .../impl/MvccEntityDataMigrationImpl.java       |  2 +-
 .../MvccEntitySerializationStrategyV3Impl.java  |  2 +-
 .../persistence/core/guice/V1ProxyImpl.java     |  2 +-
 .../core/rx/ApplicationObservable.java          |  2 +-
 .../rx/AllEntitiesInSystemTestObservable.java   |  2 +-
 .../persistence/graph/guice/GraphModule.java    |  7 +-
 .../serialization/EdgeMigrationStrategy.java    |  2 +-
 .../EdgesFromSourceObservable.java              | 32 --------
 .../graph/serialization/EdgesObservable.java    | 33 ++++++++
 .../serialization/EdgesToTargetObservable.java  | 32 --------
 .../impl/EdgeDataMigrationImpl.java             |  9 +--
 .../EdgeMetadataSerializationProxyImpl.java     | 11 ---
 .../impl/EdgesFromSourceObservableImpl.java     | 62 ---------------
 .../serialization/impl/EdgesObservableImpl.java | 80 ++++++++++++++++++++
 .../impl/EdgesToTargetObservableImpl.java       | 65 ----------------
 .../impl/TargetIdObservableImpl.java            |  6 +-
 .../persistence/index/guice/IndexModule.java    |  7 +-
 .../index/impl/EntityIndexFactoryImpl.java      | 69 -----------------
 .../index/impl/EsEntityIndexFactoryImpl.java    | 69 +++++++++++++++++
 23 files changed, 207 insertions(+), 310 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/05db37f7/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 0ca98e6..66ee593 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
@@ -692,10 +692,9 @@ public class CpEntityManagerFactory implements EntityManagerFactory, Application
 
         //explicitly invoke create index, we don't know if it exists or not in ES during a rebuild.
         em.createIndex();
+        em.reindex(po);
+        
         Application app = em.getApplication();
-
-        em.reindex( po );
-
         logger.info("\n\nRebuilt index for application {} id {}\n", app.getName(), appId );
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/05db37f7/stack/core/src/test/java/org/apache/usergrid/corepersistence/rx/EdgesFromSourceObservableIT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/corepersistence/rx/EdgesFromSourceObservableIT.java b/stack/core/src/test/java/org/apache/usergrid/corepersistence/rx/EdgesFromSourceObservableIT.java
index 2564fe5..ddee533 100644
--- a/stack/core/src/test/java/org/apache/usergrid/corepersistence/rx/EdgesFromSourceObservableIT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/corepersistence/rx/EdgesFromSourceObservableIT.java
@@ -25,7 +25,7 @@ import java.util.HashSet;
 import java.util.Set;
 import java.util.UUID;
 
-import org.apache.usergrid.persistence.graph.serialization.EdgesToTargetObservable;
+import org.apache.usergrid.persistence.graph.serialization.EdgesObservable;
 import org.junit.Test;
 
 import org.apache.usergrid.AbstractCoreIT;
@@ -61,7 +61,7 @@ public class EdgesFromSourceObservableIT extends AbstractCoreIT {
     @Test
     public void testEntities() throws Exception {
 
-        EdgesToTargetObservable edgesToTargetObservable = CpSetup.getInjector().getInstance(EdgesToTargetObservable.class);
+        EdgesObservable edgesToTargetObservable = CpSetup.getInjector().getInstance(EdgesObservable.class);
         final EntityManager em = app.getEntityManager();
         final Application createdApplication = em.getApplication();
 
@@ -98,7 +98,7 @@ public class EdgesFromSourceObservableIT extends AbstractCoreIT {
 
         final GraphManager gm = managerCache.getGraphManager( scope );
 
-        edgesToTargetObservable.getEdgesToTarget( gm, target ).doOnNext( new Action1<Edge>() {
+        edgesToTargetObservable.edgesToTarget( gm, target ).doOnNext( new Action1<Edge>() {
             @Override
             public void call( final Edge edge ) {
                 final String edgeType = edge.getType();

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/05db37f7/stack/core/src/test/java/org/apache/usergrid/corepersistence/rx/EdgesToTargetObservableIT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/corepersistence/rx/EdgesToTargetObservableIT.java b/stack/core/src/test/java/org/apache/usergrid/corepersistence/rx/EdgesToTargetObservableIT.java
index 5d25f62..0522284 100644
--- a/stack/core/src/test/java/org/apache/usergrid/corepersistence/rx/EdgesToTargetObservableIT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/corepersistence/rx/EdgesToTargetObservableIT.java
@@ -20,12 +20,10 @@
 package org.apache.usergrid.corepersistence.rx;
 
 
-import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Set;
-import java.util.UUID;
 
-import org.apache.usergrid.persistence.graph.serialization.EdgesFromSourceObservable;
+import org.apache.usergrid.persistence.graph.serialization.EdgesObservable;
 import org.junit.Test;
 
 import org.apache.usergrid.AbstractCoreIT;
@@ -33,16 +31,12 @@ import org.apache.usergrid.corepersistence.CpSetup;
 import org.apache.usergrid.corepersistence.EntityWriteHelper;
 import org.apache.usergrid.corepersistence.ManagerCache;
 import org.apache.usergrid.corepersistence.util.CpNamingUtils;
-import org.apache.usergrid.persistence.Entity;
 import org.apache.usergrid.persistence.EntityManager;
 import org.apache.usergrid.persistence.SimpleEntityRef;
 import org.apache.usergrid.persistence.core.scope.ApplicationScope;
-import org.apache.usergrid.persistence.entities.Application;
 import org.apache.usergrid.persistence.graph.Edge;
 import org.apache.usergrid.persistence.graph.GraphManager;
-import org.apache.usergrid.persistence.graph.GraphManagerFactory;
 import org.apache.usergrid.persistence.model.entity.Id;
-import org.apache.usergrid.persistence.model.entity.SimpleId;
 
 import rx.functions.Action1;
 
@@ -60,7 +54,7 @@ public class EdgesToTargetObservableIT extends AbstractCoreIT {
     @Test
     public void testEntities() throws Exception {
 
-        EdgesFromSourceObservable edgesFromSourceObservable=  CpSetup.getInjector().getInstance(EdgesFromSourceObservable.class);
+        EdgesObservable edgesFromSourceObservable=  CpSetup.getInjector().getInstance(EdgesObservable.class);
         final EntityManager em = app.getEntityManager();
 
         final String type1 = "type1things";

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/05db37f7/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/MvccEntityMigrationStrategy.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/MvccEntityMigrationStrategy.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/MvccEntityMigrationStrategy.java
index f99d175..6fed25d 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/MvccEntityMigrationStrategy.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/MvccEntityMigrationStrategy.java
@@ -23,7 +23,7 @@ import org.apache.usergrid.persistence.collection.serialization.MvccEntitySerial
 import org.apache.usergrid.persistence.core.migration.schema.MigrationStrategy;
 
 /**
- * Classy class class.
+ * Encapsulates the migration path between versions
  */
 public interface MvccEntityMigrationStrategy extends MigrationStrategy<MvccEntitySerializationStrategy> {
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/05db37f7/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntityDataMigrationImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntityDataMigrationImpl.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntityDataMigrationImpl.java
index 864a3af..e295356 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntityDataMigrationImpl.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntityDataMigrationImpl.java
@@ -46,7 +46,7 @@ import java.util.UUID;
 import java.util.concurrent.atomic.AtomicLong;
 
 /**
- * Classy class class.
+ * Data migration strategy for entities
  */
 public class MvccEntityDataMigrationImpl implements DataMigration {
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/05db37f7/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyV3Impl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyV3Impl.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyV3Impl.java
index 96ac428..a8dac8f 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyV3Impl.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyV3Impl.java
@@ -20,7 +20,7 @@ import java.nio.ByteBuffer;
 import java.util.UUID;
 
 /**
- * Classy class class.
+ * V3 Serialization Implementation
  */
 public class MvccEntitySerializationStrategyV3Impl extends MvccEntitySerializationStrategyImpl {
     private static final IdRowCompositeSerializer ID_SER = IdRowCompositeSerializer.get();

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/05db37f7/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/guice/V1ProxyImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/guice/V1ProxyImpl.java b/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/guice/V1ProxyImpl.java
index d783f0a..e1e7741 100644
--- a/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/guice/V1ProxyImpl.java
+++ b/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/guice/V1ProxyImpl.java
@@ -27,7 +27,7 @@ import static java.lang.annotation.ElementType.PARAMETER;
 import static java.lang.annotation.RetentionPolicy.RUNTIME;
 
 /**
- * Classy class class.
+ * V1 proxy annotation
  */
 @BindingAnnotation
 @Target({ FIELD, PARAMETER, METHOD }) @Retention(RUNTIME)

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/05db37f7/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/rx/ApplicationObservable.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/rx/ApplicationObservable.java b/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/rx/ApplicationObservable.java
index 4b70462..09e888d 100644
--- a/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/rx/ApplicationObservable.java
+++ b/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/rx/ApplicationObservable.java
@@ -23,7 +23,7 @@ import org.apache.usergrid.persistence.model.entity.Id;
 import rx.Observable;
 
 /**
- * Classy class class.
+ * Observable to emit all app ids
  */
 public interface ApplicationObservable {
     /**

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/05db37f7/stack/corepersistence/common/src/test/java/org/apache/usergrid/persistence/core/rx/AllEntitiesInSystemTestObservable.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/common/src/test/java/org/apache/usergrid/persistence/core/rx/AllEntitiesInSystemTestObservable.java b/stack/corepersistence/common/src/test/java/org/apache/usergrid/persistence/core/rx/AllEntitiesInSystemTestObservable.java
index ead42a4..fd19e9c 100644
--- a/stack/corepersistence/common/src/test/java/org/apache/usergrid/persistence/core/rx/AllEntitiesInSystemTestObservable.java
+++ b/stack/corepersistence/common/src/test/java/org/apache/usergrid/persistence/core/rx/AllEntitiesInSystemTestObservable.java
@@ -23,7 +23,7 @@ import org.apache.usergrid.persistence.core.scope.ApplicationEntityGroup;
 import rx.Observable;
 
 /**
- * Classy class class.
+ * Test class to mock observable
  */
 public class AllEntitiesInSystemTestObservable implements AllEntitiesInSystemObservable{
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/05db37f7/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/guice/GraphModule.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/guice/GraphModule.java b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/guice/GraphModule.java
index 6626d84..5e4a300 100644
--- a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/guice/GraphModule.java
+++ b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/guice/GraphModule.java
@@ -33,9 +33,7 @@ import org.apache.usergrid.persistence.core.migration.schema.Migration;
 import org.apache.usergrid.persistence.core.task.NamedTaskExecutorImpl;
 import org.apache.usergrid.persistence.core.task.TaskExecutor;
 import org.apache.usergrid.persistence.graph.GraphFig;
-import org.apache.usergrid.persistence.graph.GraphManager;
 import org.apache.usergrid.persistence.graph.GraphManagerFactory;
-import org.apache.usergrid.persistence.graph.impl.GraphManagerImpl;
 import org.apache.usergrid.persistence.graph.impl.stage.EdgeDeleteListener;
 import org.apache.usergrid.persistence.graph.impl.stage.EdgeDeleteListenerImpl;
 import org.apache.usergrid.persistence.graph.impl.stage.EdgeDeleteRepair;
@@ -68,7 +66,6 @@ import com.google.inject.Inject;
 import com.google.inject.Key;
 import com.google.inject.Provides;
 import com.google.inject.Singleton;
-import com.google.inject.assistedinject.FactoryModuleBuilder;
 import com.google.inject.multibindings.Multibinder;
 
 
@@ -89,11 +86,11 @@ public class GraphModule extends AbstractModule {
 
         //bind(GraphManager.class).to(GraphManagerImpl.class );
 
-        bind(EdgesFromSourceObservable.class).to(EdgesFromSourceObservableImpl.class);
+        bind(EdgesObservable.class).to(EdgesObservableImpl.class);
 
         bind(TargetIdObservable.class).to(TargetIdObservableImpl.class);
 
-        bind(EdgesToTargetObservable.class).to(EdgesToTargetObservableImpl.class);
+        bind(EdgesObservable.class).to(EdgesObservableImpl.class);
 
         bind(EdgeMetadataSerialization.class).to(EdgeMetadataSerializationProxyImpl.class);
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/05db37f7/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/EdgeMigrationStrategy.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/EdgeMigrationStrategy.java b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/EdgeMigrationStrategy.java
index ed46e43..41fe7ad 100644
--- a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/EdgeMigrationStrategy.java
+++ b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/EdgeMigrationStrategy.java
@@ -25,7 +25,7 @@ import org.apache.usergrid.persistence.graph.Edge;
 import java.util.List;
 
 /**
- * Classy class class.
+ * Encapsulates version migration for graph
  */
 public interface EdgeMigrationStrategy extends MigrationStrategy<EdgeMetadataSerialization> {
     public static final int MIGRATION_VERSION = 2;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/05db37f7/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/EdgesFromSourceObservable.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/EdgesFromSourceObservable.java b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/EdgesFromSourceObservable.java
deleted file mode 100644
index 35ad41c..0000000
--- a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/EdgesFromSourceObservable.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- *
- *  * Licensed to the Apache Software Foundation (ASF) under one or more
- *  *  contributor license agreements.  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.  For additional information regarding
- *  * copyright in this work, please see the NOTICE file in the top level
- *  * directory of this distribution.
- *
- */
-package org.apache.usergrid.persistence.graph.serialization;
-
-import org.apache.usergrid.persistence.graph.Edge;
-import org.apache.usergrid.persistence.graph.GraphManager;
-import org.apache.usergrid.persistence.model.entity.Id;
-import rx.Observable;
-
-/**
- * Classy class class.
- */
-public interface EdgesFromSourceObservable {
-    Observable<Edge> edgesFromSource( final GraphManager gm, final Id sourceNode);
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/05db37f7/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/EdgesObservable.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/EdgesObservable.java b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/EdgesObservable.java
new file mode 100644
index 0000000..2206953
--- /dev/null
+++ b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/EdgesObservable.java
@@ -0,0 +1,33 @@
+/*
+ *
+ *  * Licensed to the Apache Software Foundation (ASF) under one or more
+ *  *  contributor license agreements.  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.  For additional information regarding
+ *  * copyright in this work, please see the NOTICE file in the top level
+ *  * directory of this distribution.
+ *
+ */
+package org.apache.usergrid.persistence.graph.serialization;
+
+import org.apache.usergrid.persistence.graph.Edge;
+import org.apache.usergrid.persistence.graph.GraphManager;
+import org.apache.usergrid.persistence.model.entity.Id;
+import rx.Observable;
+
+/**
+ * Get all edges from source
+ */
+public interface EdgesObservable {
+    Observable<Edge> edgesFromSource( final GraphManager gm, final Id sourceNode);
+    Observable<Edge> edgesToTarget(final GraphManager gm,  final Id targetNode);
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/05db37f7/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/EdgesToTargetObservable.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/EdgesToTargetObservable.java b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/EdgesToTargetObservable.java
deleted file mode 100644
index cfec5bd..0000000
--- a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/EdgesToTargetObservable.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- *
- *  * Licensed to the Apache Software Foundation (ASF) under one or more
- *  *  contributor license agreements.  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.  For additional information regarding
- *  * copyright in this work, please see the NOTICE file in the top level
- *  * directory of this distribution.
- *
- */
-package org.apache.usergrid.persistence.graph.serialization;
-
-import org.apache.usergrid.persistence.graph.Edge;
-import org.apache.usergrid.persistence.graph.GraphManager;
-import org.apache.usergrid.persistence.model.entity.Id;
-import rx.Observable;
-
-/**
- * Classy class class.
- */
-public interface EdgesToTargetObservable {
-    Observable<Edge> getEdgesToTarget(final GraphManager gm,  final Id targetNode);
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/05db37f7/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/EdgeDataMigrationImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/EdgeDataMigrationImpl.java b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/EdgeDataMigrationImpl.java
index 7ddde13..c506aca 100644
--- a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/EdgeDataMigrationImpl.java
+++ b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/EdgeDataMigrationImpl.java
@@ -30,8 +30,7 @@ import org.apache.usergrid.persistence.graph.Edge;
 import org.apache.usergrid.persistence.graph.GraphManager;
 import org.apache.usergrid.persistence.graph.GraphManagerFactory;
 import org.apache.usergrid.persistence.graph.serialization.EdgeMigrationStrategy;
-import org.apache.usergrid.persistence.graph.serialization.EdgesFromSourceObservable;
-import org.apache.usergrid.persistence.model.entity.Id;
+import org.apache.usergrid.persistence.graph.serialization.EdgesObservable;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import rx.Observable;
@@ -42,7 +41,7 @@ import java.util.List;
 import java.util.concurrent.atomic.AtomicLong;
 
 /**
- * Classy class class.
+ * Encapsulates data mi
  */
 
 public class EdgeDataMigrationImpl implements DataMigration {
@@ -51,13 +50,13 @@ public class EdgeDataMigrationImpl implements DataMigration {
 
     private final Keyspace keyspace;
     private final GraphManagerFactory graphManagerFactory;
-    private final EdgesFromSourceObservable edgesFromSourceObservable;
+    private final EdgesObservable edgesFromSourceObservable;
     private final EdgeMigrationStrategy edgeMigrationStrategy;
 
     @Inject
     public EdgeDataMigrationImpl(final Keyspace keyspace,
                                  final GraphManagerFactory graphManagerFactory,
-                                 final EdgesFromSourceObservable edgesFromSourceObservable,
+                                 final EdgesObservable edgesFromSourceObservable,
                                  final EdgeMigrationStrategy edgeMigrationStrategy
     ) {
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/05db37f7/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/EdgeMetadataSerializationProxyImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/EdgeMetadataSerializationProxyImpl.java b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/EdgeMetadataSerializationProxyImpl.java
index 9a13234..acba53f 100644
--- a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/EdgeMetadataSerializationProxyImpl.java
+++ b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/EdgeMetadataSerializationProxyImpl.java
@@ -25,23 +25,15 @@ package org.apache.usergrid.persistence.graph.serialization.impl;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.Iterator;
-import java.util.List;
-import java.util.concurrent.atomic.AtomicLong;
 
-import com.netflix.astyanax.connectionpool.exceptions.ConnectionException;
 import org.apache.usergrid.persistence.core.astyanax.MultiTennantColumnFamilyDefinition;
 import org.apache.usergrid.persistence.core.guice.V1Impl;
 import org.apache.usergrid.persistence.core.guice.V2Impl;
-import org.apache.usergrid.persistence.core.migration.data.DataMigration;
 import org.apache.usergrid.persistence.core.migration.data.DataMigrationManager;
-import org.apache.usergrid.persistence.core.scope.ApplicationEntityGroup;
 import org.apache.usergrid.persistence.core.scope.ApplicationScope;
 import org.apache.usergrid.persistence.graph.*;
-import org.apache.usergrid.persistence.graph.impl.SimpleSearchByEdgeType;
-import org.apache.usergrid.persistence.graph.impl.SimpleSearchEdgeType;
 import org.apache.usergrid.persistence.graph.serialization.EdgeMetadataSerialization;
 import org.apache.usergrid.persistence.graph.serialization.EdgeMigrationStrategy;
-import org.apache.usergrid.persistence.graph.serialization.EdgesFromSourceObservable;
 import org.apache.usergrid.persistence.model.entity.Id;
 
 import com.google.inject.Inject;
@@ -50,9 +42,6 @@ import com.netflix.astyanax.Keyspace;
 import com.netflix.astyanax.MutationBatch;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import rx.Observable;
-import rx.functions.Action1;
-import rx.functions.Func1;
 
 
 @Singleton

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/05db37f7/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/EdgesFromSourceObservableImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/EdgesFromSourceObservableImpl.java b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/EdgesFromSourceObservableImpl.java
deleted file mode 100644
index 1725f2d..0000000
--- a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/EdgesFromSourceObservableImpl.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- *
- *  * Licensed to the Apache Software Foundation (ASF) under one or more
- *  *  contributor license agreements.  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.  For additional information regarding
- *  * copyright in this work, please see the NOTICE file in the top level
- *  * directory of this distribution.
- *
- */
-package org.apache.usergrid.persistence.graph.serialization.impl;
-
-import org.apache.usergrid.persistence.graph.Edge;
-import org.apache.usergrid.persistence.graph.GraphManager;
-import org.apache.usergrid.persistence.graph.SearchByEdgeType;
-import org.apache.usergrid.persistence.graph.impl.SimpleSearchByEdgeType;
-import org.apache.usergrid.persistence.graph.impl.SimpleSearchEdgeType;
-import org.apache.usergrid.persistence.graph.serialization.EdgesFromSourceObservable;
-import org.apache.usergrid.persistence.model.entity.Id;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import rx.Observable;
-import rx.functions.Func1;
-
-/**
- * Emits the edges that are edges from the specified source node
- */
-public class EdgesFromSourceObservableImpl implements EdgesFromSourceObservable {
-
-    private static final Logger logger = LoggerFactory.getLogger(EdgesFromSourceObservableImpl.class);
-    public EdgesFromSourceObservableImpl(){
-
-    }
-
-    /**
-     * Get all edges from the source
-     */
-    @Override
-    public  Observable<Edge> edgesFromSource( final GraphManager gm, final Id sourceNode){
-        Observable<String> edgeTypes = gm.getEdgeTypesFromSource( new SimpleSearchEdgeType( sourceNode, null, null ) );
-
-        return edgeTypes.flatMap( new Func1<String, Observable<Edge>>() {
-            @Override
-            public Observable<Edge> call( final String edgeType ) {
-
-                logger.debug( "Loading edges of edgeType {} from {}", edgeType, sourceNode );
-
-                return gm.loadEdgesFromSource( new SimpleSearchByEdgeType( sourceNode, edgeType, Long.MAX_VALUE,
-                    SearchByEdgeType.Order.DESCENDING, null ) );
-            }
-        } );
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/05db37f7/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/EdgesObservableImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/EdgesObservableImpl.java b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/EdgesObservableImpl.java
new file mode 100644
index 0000000..371cf1d
--- /dev/null
+++ b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/EdgesObservableImpl.java
@@ -0,0 +1,80 @@
+/*
+ *
+ *  * Licensed to the Apache Software Foundation (ASF) under one or more
+ *  *  contributor license agreements.  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.  For additional information regarding
+ *  * copyright in this work, please see the NOTICE file in the top level
+ *  * directory of this distribution.
+ *
+ */
+package org.apache.usergrid.persistence.graph.serialization.impl;
+
+import org.apache.usergrid.persistence.graph.Edge;
+import org.apache.usergrid.persistence.graph.GraphManager;
+import org.apache.usergrid.persistence.graph.SearchByEdgeType;
+import org.apache.usergrid.persistence.graph.impl.SimpleSearchByEdgeType;
+import org.apache.usergrid.persistence.graph.impl.SimpleSearchEdgeType;
+import org.apache.usergrid.persistence.graph.serialization.EdgesObservable;
+import org.apache.usergrid.persistence.model.entity.Id;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import rx.Observable;
+import rx.functions.Func1;
+
+/**
+ * Emits the edges that are edges from the specified source node
+ */
+public class EdgesObservableImpl implements EdgesObservable {
+
+    private static final Logger logger = LoggerFactory.getLogger(EdgesObservableImpl.class);
+    public EdgesObservableImpl(){
+
+    }
+
+    /**
+     * Get all edges from the source
+     */
+    @Override
+    public  Observable<Edge> edgesFromSource( final GraphManager gm, final Id sourceNode){
+        Observable<String> edgeTypes = gm.getEdgeTypesFromSource( new SimpleSearchEdgeType( sourceNode, null, null ) );
+
+        return edgeTypes.flatMap( new Func1<String, Observable<Edge>>() {
+            @Override
+            public Observable<Edge> call( final String edgeType ) {
+
+                logger.debug( "Loading edges of edgeType {} from {}", edgeType, sourceNode );
+
+                return gm.loadEdgesFromSource( new SimpleSearchByEdgeType( sourceNode, edgeType, Long.MAX_VALUE,
+                    SearchByEdgeType.Order.DESCENDING, null ) );
+            }
+        } );
+    }
+    /**
+     * Get all edges from the source
+     */
+    @Override
+    public  Observable<Edge> edgesToTarget(final GraphManager gm,  final Id targetNode) {
+        Observable<String> edgeTypes = gm.getEdgeTypesToTarget( new SimpleSearchEdgeType( targetNode, null, null ) );
+
+        return edgeTypes.flatMap( new Func1<String, Observable<Edge>>() {
+            @Override
+            public Observable<Edge> call( final String edgeType ) {
+
+                logger.debug( "Loading edges of edgeType {} to {}", edgeType, targetNode);
+
+                return gm.loadEdgesToTarget( new SimpleSearchByEdgeType( targetNode, edgeType, Long.MAX_VALUE,
+                    SearchByEdgeType.Order.DESCENDING, null ) );
+            }
+        } );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/05db37f7/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/EdgesToTargetObservableImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/EdgesToTargetObservableImpl.java b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/EdgesToTargetObservableImpl.java
deleted file mode 100644
index d84b286..0000000
--- a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/EdgesToTargetObservableImpl.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- *
- *  * Licensed to the Apache Software Foundation (ASF) under one or more
- *  *  contributor license agreements.  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.  For additional information regarding
- *  * copyright in this work, please see the NOTICE file in the top level
- *  * directory of this distribution.
- *
- */
-package org.apache.usergrid.persistence.graph.serialization.impl;
-
-import org.apache.usergrid.persistence.graph.Edge;
-import org.apache.usergrid.persistence.graph.GraphManager;
-import org.apache.usergrid.persistence.graph.SearchByEdgeType;
-import org.apache.usergrid.persistence.graph.impl.SimpleSearchByEdgeType;
-import org.apache.usergrid.persistence.graph.impl.SimpleSearchEdgeType;
-import org.apache.usergrid.persistence.graph.serialization.EdgesToTargetObservable;
-import org.apache.usergrid.persistence.model.entity.Id;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import rx.Observable;
-import rx.functions.Func1;
-
-/**
- * Classy class class.
- */
-public class EdgesToTargetObservableImpl implements EdgesToTargetObservable {
-
-    public EdgesToTargetObservableImpl(){
-
-    }
-
-        private  final Logger logger = LoggerFactory.getLogger(EdgesToTargetObservableImpl.class);
-
-
-        /**
-         * Get all edges from the source
-         */
-        @Override
-        public  Observable<Edge> getEdgesToTarget(final GraphManager gm,  final Id targetNode) {
-            Observable<String> edgeTypes = gm.getEdgeTypesToTarget( new SimpleSearchEdgeType( targetNode, null, null ) );
-
-            return edgeTypes.flatMap( new Func1<String, Observable<Edge>>() {
-                @Override
-                public Observable<Edge> call( final String edgeType ) {
-
-                    logger.debug( "Loading edges of edgeType {} to {}", edgeType, targetNode);
-
-                    return gm.loadEdgesToTarget( new SimpleSearchByEdgeType( targetNode, edgeType, Long.MAX_VALUE,
-                        SearchByEdgeType.Order.DESCENDING, null ) );
-                }
-            } );
-        }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/05db37f7/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/TargetIdObservableImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/TargetIdObservableImpl.java b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/TargetIdObservableImpl.java
index 1cac592..9729e63 100644
--- a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/TargetIdObservableImpl.java
+++ b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/TargetIdObservableImpl.java
@@ -23,7 +23,7 @@ package org.apache.usergrid.persistence.graph.serialization.impl;
 import com.google.inject.Inject;
 import org.apache.usergrid.persistence.graph.Edge;
 import org.apache.usergrid.persistence.graph.GraphManager;
-import org.apache.usergrid.persistence.graph.serialization.EdgesFromSourceObservable;
+import org.apache.usergrid.persistence.graph.serialization.EdgesObservable;
 import org.apache.usergrid.persistence.graph.serialization.TargetIdObservable;
 import org.apache.usergrid.persistence.model.entity.Id;
 import org.slf4j.Logger;
@@ -37,10 +37,10 @@ import rx.functions.Func1;
 public class TargetIdObservableImpl implements TargetIdObservable {
 
     private static final Logger logger = LoggerFactory.getLogger(TargetIdObservableImpl.class);
-    private final EdgesFromSourceObservable edgesFromSourceObservable;
+    private final EdgesObservable edgesFromSourceObservable;
 
     @Inject
-    public TargetIdObservableImpl(final EdgesFromSourceObservable edgesFromSourceObservable){
+    public TargetIdObservableImpl(final EdgesObservable edgesFromSourceObservable){
         this.edgesFromSourceObservable = edgesFromSourceObservable;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/05db37f7/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/guice/IndexModule.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/guice/IndexModule.java b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/guice/IndexModule.java
index 629874b..05da627 100644
--- a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/guice/IndexModule.java
+++ b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/guice/IndexModule.java
@@ -21,11 +21,8 @@ package org.apache.usergrid.persistence.index.guice;
 
 import org.apache.usergrid.persistence.index.IndexFig;
 import com.google.inject.AbstractModule;
-import com.google.inject.assistedinject.FactoryModuleBuilder;
-import org.apache.usergrid.persistence.index.EntityIndex;
 import org.apache.usergrid.persistence.index.EntityIndexFactory;
-import org.apache.usergrid.persistence.index.impl.EntityIndexFactoryImpl;
-import org.apache.usergrid.persistence.index.impl.EsEntityIndexImpl;
+import org.apache.usergrid.persistence.index.impl.EsEntityIndexFactoryImpl;
 import org.safehaus.guicyfig.GuicyFigModule;
 
 
@@ -37,7 +34,7 @@ public class IndexModule extends AbstractModule {
         // install our configuration
         install (new GuicyFigModule( IndexFig.class ));
 
-        bind(EntityIndexFactory.class).to(EntityIndexFactoryImpl.class);
+        bind(EntityIndexFactory.class).to(EsEntityIndexFactoryImpl.class);
 
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/05db37f7/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EntityIndexFactoryImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EntityIndexFactoryImpl.java b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EntityIndexFactoryImpl.java
deleted file mode 100644
index 7378bfe..0000000
--- a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EntityIndexFactoryImpl.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- *
- *  * Licensed to the Apache Software Foundation (ASF) under one or more
- *  *  contributor license agreements.  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.  For additional information regarding
- *  * copyright in this work, please see the NOTICE file in the top level
- *  * directory of this distribution.
- *
- */
-package org.apache.usergrid.persistence.index.impl;
-
-import com.google.common.cache.CacheBuilder;
-import com.google.common.cache.CacheLoader;
-import com.google.common.cache.LoadingCache;
-import com.google.inject.Inject;
-import com.google.inject.assistedinject.Assisted;
-import org.apache.usergrid.persistence.core.scope.ApplicationScope;
-import org.apache.usergrid.persistence.index.EntityIndex;
-import org.apache.usergrid.persistence.index.EntityIndexFactory;
-import org.apache.usergrid.persistence.index.IndexFig;
-
-import java.util.concurrent.ExecutionException;
-
-/**
- * Classy class class.
- */
-public class EntityIndexFactoryImpl implements EntityIndexFactory{
-
-    private final IndexFig config;
-    private final EsProvider provider;
-    private final EsIndexCache indexCache;
-
-    private LoadingCache<ApplicationScope, EntityIndex> eiCache =
-        CacheBuilder.newBuilder().maximumSize( 1000 ).build( new CacheLoader<ApplicationScope, EntityIndex>() {
-            public EntityIndex load( ApplicationScope scope ) {
-                return new EsEntityIndexImpl(scope,config,provider,indexCache);
-            }
-        } );
-    @Inject
-    public EntityIndexFactoryImpl(final IndexFig config, final EsProvider provider, final EsIndexCache indexCache){
-        this.config = config;
-        this.provider = provider;
-        this.indexCache = indexCache;
-    }
-
-    @Override
-    public EntityIndex createEntityIndex(final ApplicationScope appScope) {
-        try{
-            return eiCache.get(appScope);
-        }catch (ExecutionException ee){
-            throw new RuntimeException(ee);
-        }
-    }
-
-    @Override
-    public void invalidate() {
-        eiCache.invalidateAll();
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/05db37f7/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexFactoryImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexFactoryImpl.java b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexFactoryImpl.java
new file mode 100644
index 0000000..0c643a1
--- /dev/null
+++ b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexFactoryImpl.java
@@ -0,0 +1,69 @@
+/*
+ *
+ *  * Licensed to the Apache Software Foundation (ASF) under one or more
+ *  *  contributor license agreements.  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.  For additional information regarding
+ *  * copyright in this work, please see the NOTICE file in the top level
+ *  * directory of this distribution.
+ *
+ */
+package org.apache.usergrid.persistence.index.impl;
+
+import com.google.common.cache.CacheBuilder;
+import com.google.common.cache.CacheLoader;
+import com.google.common.cache.LoadingCache;
+import com.google.inject.Inject;
+import com.google.inject.assistedinject.Assisted;
+import org.apache.usergrid.persistence.core.scope.ApplicationScope;
+import org.apache.usergrid.persistence.index.EntityIndex;
+import org.apache.usergrid.persistence.index.EntityIndexFactory;
+import org.apache.usergrid.persistence.index.IndexFig;
+
+import java.util.concurrent.ExecutionException;
+
+/**
+ * Get index from factory, adds caching
+ */
+public class EsEntityIndexFactoryImpl implements EntityIndexFactory{
+
+    private final IndexFig config;
+    private final EsProvider provider;
+    private final EsIndexCache indexCache;
+
+    private LoadingCache<ApplicationScope, EntityIndex> eiCache =
+        CacheBuilder.newBuilder().maximumSize( 1000 ).build( new CacheLoader<ApplicationScope, EntityIndex>() {
+            public EntityIndex load( ApplicationScope scope ) {
+                return new EsEntityIndexImpl(scope,config,provider,indexCache);
+            }
+        } );
+    @Inject
+    public EsEntityIndexFactoryImpl(final IndexFig config, final EsProvider provider, final EsIndexCache indexCache){
+        this.config = config;
+        this.provider = provider;
+        this.indexCache = indexCache;
+    }
+
+    @Override
+    public EntityIndex createEntityIndex(final ApplicationScope appScope) {
+        try{
+            return eiCache.get(appScope);
+        }catch (ExecutionException ee){
+            throw new RuntimeException(ee);
+        }
+    }
+
+    @Override
+    public void invalidate() {
+        eiCache.invalidateAll();
+    }
+}