usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sfeld...@apache.org
Subject [27/31] incubator-usergrid git commit: Added operational logging to tasks
Date Mon, 09 Mar 2015 15:25:40 GMT
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-405
Commit: 5decb0db1639271c1e8b2a77be373f97334df26c
Parents: fc07d9a
Author: Todd Nine <tnine@apigee.com>
Authored: Sun Mar 8 21:49:10 2015 -0600
Committer: Todd Nine <tnine@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" );
             }
         };
 


Mime
View raw message