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 2015/11/12 23:15:00 UTC

[10/15] usergrid git commit: fix alias issues

fix alias issues


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

Branch: refs/heads/master
Commit: f13e45b16561494d460a0f9c8592e319308be049
Parents: c068ab0
Author: Shawn Feldman <sf...@apache.org>
Authored: Thu Nov 12 12:36:52 2015 -0700
Committer: Shawn Feldman <sf...@apache.org>
Committed: Thu Nov 12 12:36:52 2015 -0700

----------------------------------------------------------------------
 .../asyncevents/AmazonAsyncEventService.java     | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/f13e45b1/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AmazonAsyncEventService.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AmazonAsyncEventService.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AmazonAsyncEventService.java
index e99c052..b5e77c1 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AmazonAsyncEventService.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AmazonAsyncEventService.java
@@ -28,7 +28,8 @@ import java.util.concurrent.atomic.AtomicLong;
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
 
-import org.apache.usergrid.persistence.index.impl.IndexingUtils;
+import org.apache.usergrid.persistence.index.impl.*;
+import org.elasticsearch.action.index.IndexRequest;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -56,8 +57,6 @@ import org.apache.usergrid.persistence.graph.Edge;
 import org.apache.usergrid.persistence.index.EntityIndex;
 import org.apache.usergrid.persistence.index.EntityIndexFactory;
 import org.apache.usergrid.persistence.index.IndexLocationStrategy;
-import org.apache.usergrid.persistence.index.impl.IndexOperationMessage;
-import org.apache.usergrid.persistence.index.impl.IndexProducer;
 import org.apache.usergrid.persistence.map.MapManager;
 import org.apache.usergrid.persistence.map.MapManagerFactory;
 import org.apache.usergrid.persistence.map.MapScope;
@@ -571,26 +570,26 @@ public class AmazonAsyncEventService implements AsyncEventService {
      * @param indexOperationMessage
      */
     private void initializeEntityIndexes(final IndexOperationMessage indexOperationMessage) {
-        Map<UUID,Boolean> apps = new HashMap<>(indexOperationMessage.getIndexRequests().size()+indexOperationMessage.getDeIndexRequests().size());
+        final Map<UUID,Boolean> apps = new HashMap<>(indexOperationMessage.getIndexRequests().size()+indexOperationMessage.getDeIndexRequests().size());
         //loop through all adds
-        indexOperationMessage.getIndexRequests().stream().forEach(req -> {
-            UUID appId = IndexingUtils.getApplicationIdFromIndexDocId(req.documentId);
+        for(IndexOperation req : indexOperationMessage.getIndexRequests()) {
+            final UUID appId = IndexingUtils.getApplicationIdFromIndexDocId(req.documentId);
             if(!apps.containsKey(appId)) {
                 ApplicationScope appScope = CpNamingUtils.getApplicationScope(appId);
                 entityIndexFactory.createEntityIndex(indexLocationStrategyFactory.getIndexLocationStrategy(appScope));
                 apps.put(appId,true);
             }
-        });
+        };
 
         //loop through all deletes
-        indexOperationMessage.getDeIndexRequests().stream().forEach(req -> {
-            UUID appId = IndexingUtils.getApplicationIdFromIndexDocId(req.documentId);
+        for(DeIndexOperation req : indexOperationMessage.getDeIndexRequests()) {
+            final UUID appId = IndexingUtils.getApplicationIdFromIndexDocId(req.documentId);
             if(!apps.containsKey(appId)) {
                 ApplicationScope appScope = CpNamingUtils.getApplicationScope(appId);
                 entityIndexFactory.createEntityIndex(indexLocationStrategyFactory.getIndexLocationStrategy(appScope));
                 apps.put(appId,true);
             }
-        });
+        };
     }