usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sfeld...@apache.org
Subject [23/36] usergrid git commit: fix the ingest method
Date Thu, 01 Oct 2015 16:27:58 GMT
fix the ingest method


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

Branch: refs/heads/master
Commit: 19ae15bdeb41af154a4770b600d106acdb71dc88
Parents: 3ed0848
Author: Shawn Feldman <sfeldman@apache.org>
Authored: Mon Sep 28 11:14:28 2015 -0600
Committer: Shawn Feldman <sfeldman@apache.org>
Committed: Mon Sep 28 11:14:28 2015 -0600

----------------------------------------------------------------------
 .../corepersistence/asyncevents/AmazonAsyncEventService.java   | 2 +-
 .../usergrid/persistence/index/impl/IndexOperationMessage.java | 6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/19ae15bd/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 e1c6886..82e6d19 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
@@ -268,7 +268,7 @@ public class AmazonAsyncEventService implements AsyncEventService {
             .flatMap(indexEventResults -> {
                 IndexOperationMessage combined = new IndexOperationMessage();
                 Observable.from(indexEventResults)
-                    .doOnNext(indexEventResult -> combined.injest(indexEventResult.getIndexOperationMessage().get())).subscribe();
+                    .doOnNext(indexEventResult -> combined.ingest(indexEventResult.getIndexOperationMessage().get())).subscribe();
                 indexProducer.put(combined).subscribe();
                 return Observable.from(indexEventResults);
             })

http://git-wip-us.apache.org/repos/asf/usergrid/blob/19ae15bd/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/IndexOperationMessage.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/IndexOperationMessage.java
b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/IndexOperationMessage.java
index 0676314..12df390 100644
--- a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/IndexOperationMessage.java
+++ b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/IndexOperationMessage.java
@@ -23,6 +23,7 @@ package org.apache.usergrid.persistence.index.impl;
 import java.io.Serializable;
 import java.util.HashSet;
 import java.util.Set;
+import java.util.stream.Collectors;
 
 import com.fasterxml.jackson.annotation.JsonIgnore;
 import com.google.common.base.Optional;
@@ -108,7 +109,8 @@ public class IndexOperationMessage implements Serializable {
         return creationTime;
     }
 
-    public void injest(IndexOperationMessage singleMessage) {
-        si
+    public void ingest(IndexOperationMessage singleMessage) {
+        this.indexRequests.addAll(singleMessage.getIndexRequests().stream().collect(Collectors.toList()));
+        this.deIndexRequests.addAll(singleMessage.getDeIndexRequests().stream().collect(Collectors.toList()));
     }
 }


Mime
View raw message