You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by gr...@apache.org on 2015/03/12 23:41:34 UTC

[27/38] incubator-usergrid git commit: Added operational logging to tasks

Added operational logging to tasks


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

Branch: refs/heads/USERGRID-396
Commit: 5decb0db1639271c1e8b2a77be373f97334df26c
Parents: fc07d9a
Author: Todd Nine <tn...@apigee.com>
Authored: Sun Mar 8 21:49:10 2015 -0600
Committer: Todd Nine <tn...@apigee.com>
Committed: Sun Mar 8 21:49:10 2015 -0600

----------------------------------------------------------------------
 .../org/apache/usergrid/rest/IndexResource.java  | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/5decb0db/stack/rest/src/main/java/org/apache/usergrid/rest/IndexResource.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/main/java/org/apache/usergrid/rest/IndexResource.java b/stack/rest/src/main/java/org/apache/usergrid/rest/IndexResource.java
index 3269ec0..2ffc13f 100644
--- a/stack/rest/src/main/java/org/apache/usergrid/rest/IndexResource.java
+++ b/stack/rest/src/main/java/org/apache/usergrid/rest/IndexResource.java
@@ -89,6 +89,8 @@ public class IndexResource extends AbstractContextResource {
                 catch ( Exception e ) {
                     logger.error( "Unable to rebuild indexes", e );
                 }
+
+                logger.info( "Completed all indexes" );
             }
         };
 
@@ -131,12 +133,20 @@ public class IndexResource extends AbstractContextResource {
 
             @Override
             public void run() {
+
+
+                logger.info( "Started rebuilding application {} in collection ", appId );
+
+
                 try {
                     emf.rebuildApplicationIndexes( appId, po );
                 }
                 catch ( Exception e ) {
                     logger.error( "Unable to re-index application", e );
                 }
+
+
+                logger.info( "Completed rebuilding application {} in collection ", appId );
             }
         };
 
@@ -168,6 +178,8 @@ public class IndexResource extends AbstractContextResource {
 
             public void run() {
 
+                logger.info( "Started rebuilding application {} in collection {}", appId, collectionName );
+
                 try {
                     rebuildCollection( appId, collectionName, reverse );
                 } catch (Exception e) {
@@ -175,6 +187,8 @@ public class IndexResource extends AbstractContextResource {
                     // TODO: handle this in rebuildCollection() instead
                     throw new RuntimeException("Error rebuilding collection");
                 }
+
+                logger.info( "Completed rebuilding application {} in collection {}", appId, collectionName );
             }
         };
 
@@ -214,12 +228,17 @@ public class IndexResource extends AbstractContextResource {
 
             @Override
             public void run() {
+
+                logger.info( "Started rebuilding internal indexes", appId );
+
                 try {
                     emf.rebuildInternalIndexes( po );
                 }
                 catch ( Exception e ) {
                     logger.error( "Unable to re-index internals", e );
                 }
+
+                logger.info( "Completed rebuilding internal indexes" );
             }
         };