usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sfeld...@apache.org
Subject [2/2] usergrid git commit: fix observable class cast exception
Date Tue, 06 Oct 2015 00:47:01 GMT
fix observable class cast exception


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

Branch: refs/heads/review-observable
Commit: 890611de99bfce5ee02753168b101549d89d5205
Parents: d6bf2fa
Author: Shawn Feldman <sfeldman@apache.org>
Authored: Mon Oct 5 18:46:43 2015 -0600
Committer: Shawn Feldman <sfeldman@apache.org>
Committed: Mon Oct 5 18:46:43 2015 -0600

----------------------------------------------------------------------
 .../corepersistence/asyncevents/AmazonAsyncEventService.java    | 5 ++++-
 .../usergrid/persistence/index/impl/EsIndexProducerImpl.java    | 1 +
 2 files changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/890611de/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 abb76c2..37a9da5 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
@@ -446,7 +446,10 @@ public class AmazonAsyncEventService implements AsyncEventService {
             entityDeleteResults = eventBuilder.buildEntityDelete( applicationScope, entityId
);
 
 
-        final Observable<IndexOperationMessage> merged = entityDeleteResults.getEntitiesCompacted().flatMap(mvccLogEntries
-> entityDeleteResults.getIndexObservable()) ;
+        final Observable<IndexOperationMessage> merged = entityDeleteResults
+            .getEntitiesCompacted()
+            .collect(() -> new ArrayList<>(),(list,item)-> list.add(item))
+            .flatMap(collected -> entityDeleteResults.getIndexObservable()) ;
         return merged;
     }
 

http://git-wip-us.apache.org/repos/asf/usergrid/blob/890611de/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsIndexProducerImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsIndexProducerImpl.java
b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsIndexProducerImpl.java
index 828027c..409c2bc 100644
--- a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsIndexProducerImpl.java
+++ b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsIndexProducerImpl.java
@@ -207,6 +207,7 @@ public class EsIndexProducerImpl implements IndexProducer {
         if ( error ) {
             if(errorString.lastIndexOf("rejected execution (queue capacity")>=0){
                 try{
+                    log.warn("Encountered Queue Capacity Exception from ElasticSearch slowing
by " +indexFig.getSleepTimeForQueueError());
                     Thread.sleep(indexFig.getSleepTimeForQueueError());
                 }catch (InterruptedException ie){
                     //move on


Mime
View raw message