usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject [23/50] [abbrv] incubator-usergrid git commit: move method back to entityindex
Date Fri, 12 Dec 2014 14:30:22 GMT
move method back to entityindex


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

Branch: refs/heads/no-source-in-es
Commit: 18197e3de65c29db764218534f846d825bcb4b0f
Parents: 574fe64
Author: Shawn Feldman <sfeldman@apache.org>
Authored: Tue Dec 9 16:02:14 2014 -0700
Committer: Shawn Feldman <sfeldman@apache.org>
Committed: Tue Dec 9 16:02:14 2014 -0700

----------------------------------------------------------------------
 .../usergrid/corepersistence/CpEntityManagerFactory.java      | 4 +---
 .../apache/usergrid/persistence/index/AliasedEntityIndex.java | 7 -------
 .../org/apache/usergrid/persistence/index/EntityIndex.java    | 7 +++++++
 3 files changed, 8 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/18197e3d/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 56eb258..7016d3c 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
@@ -704,9 +704,7 @@ public class CpEntityManagerFactory implements EntityManagerFactory, Application
     @Override
     public void addIndex(final UUID applicationId,final String indexSuffix,final int shards,final
int replicas){
         EntityIndex entityIndex = getManagerCache().getEntityIndex(CpNamingUtils.getApplicationScope(applicationId));
-        if(entityIndex instanceof AliasedEntityIndex) {
-            ((AliasedEntityIndex)entityIndex).addIndex(indexSuffix, shards, replicas);
-        }
+        entityIndex.addIndex(indexSuffix, shards, replicas);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/18197e3d/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/AliasedEntityIndex.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/AliasedEntityIndex.java
b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/AliasedEntityIndex.java
index 15a0d45..118b7ad 100644
--- a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/AliasedEntityIndex.java
+++ b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/AliasedEntityIndex.java
@@ -38,13 +38,6 @@ public interface AliasedEntityIndex extends EntityIndex{
      */
     public void addAlias(final String indexSuffix);
 
-    /**
-     * Create an index and add to alias, will create alias and remove any old index from
write alias if alias already exists
-     * @param indexSuffix index name
-     * @param shards
-     * @param replicas
-     */
-    public void addIndex(final String indexSuffix, final int shards, final int replicas);
 
     /**
      * type of alias

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/18197e3d/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/EntityIndex.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/EntityIndex.java
b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/EntityIndex.java
index 549f87e..f1da568 100644
--- a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/EntityIndex.java
+++ b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/EntityIndex.java
@@ -38,6 +38,13 @@ public interface EntityIndex {
      */
     public void initializeIndex();
 
+    /**
+     * Create an index and add to alias, will create alias and remove any old index from
write alias if alias already exists
+     * @param indexSuffix index name
+     * @param shards
+     * @param replicas
+     */
+    public void addIndex(final String indexSuffix, final int shards, final int replicas);
 
     /**
      * Create the index batch.


Mime
View raw message