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 2014/10/17 18:35:31 UTC

[44/49] git commit: Added logging

Added logging


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

Branch: refs/heads/two-dot-o
Commit: 83200bf52f276c89f4351cf6fc8988414646507a
Parents: c31c553
Author: Todd Nine <to...@apache.org>
Authored: Thu Oct 16 19:29:01 2014 -0600
Committer: Todd Nine <to...@apache.org>
Committed: Thu Oct 16 19:30:08 2014 -0600

----------------------------------------------------------------------
 .../usergrid/persistence/index/impl/EsEntityIndexImpl.java      | 5 ++++-
 .../services/notifications/AbstractServiceNotificationIT.java   | 4 ----
 2 files changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/83200bf5/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexImpl.java b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexImpl.java
index 821f7b9..b562d8a 100644
--- a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexImpl.java
+++ b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexImpl.java
@@ -88,7 +88,9 @@ public class EsEntityIndexImpl implements EntityIndex {
 
     private final IndexFig config;
 
-    private static final int MAX_WAITS = 10;
+    //number of times to wait for the index to refresh propertly. Is an N+1, so 9 = 10
+    private static final int MAX_WAITS = 9;
+    //number of milliseconds to try again before sleeping
     private static final int WAIT_TIME = 250;
 
 
@@ -280,6 +282,7 @@ public class EsEntityIndexImpl implements EntityIndex {
         for ( int i = 0; i < MAX_WAITS; i++ ) {
             try {
                 client.admin().indices().prepareRefresh( indexName ).execute().actionGet();
+                log.debug( "Refreshed index: " + indexName );
                 return;
             }
             catch ( IndexMissingException e ) {

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/83200bf5/stack/services/src/test/java/org/apache/usergrid/services/notifications/AbstractServiceNotificationIT.java
----------------------------------------------------------------------
diff --git a/stack/services/src/test/java/org/apache/usergrid/services/notifications/AbstractServiceNotificationIT.java b/stack/services/src/test/java/org/apache/usergrid/services/notifications/AbstractServiceNotificationIT.java
index e16f111..a9ca955 100644
--- a/stack/services/src/test/java/org/apache/usergrid/services/notifications/AbstractServiceNotificationIT.java
+++ b/stack/services/src/test/java/org/apache/usergrid/services/notifications/AbstractServiceNotificationIT.java
@@ -41,11 +41,7 @@ import static org.junit.Assert.fail;
 
 public class AbstractServiceNotificationIT extends AbstractServiceIT {
     private NotificationsService ns;
-    @Autowired
-    private ServiceManagerFactory smf;
 
-    @Autowired
-    private EntityManagerFactory emf;
     @Rule
     public TestName name = new TestName();