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/11/12 18:35:13 UTC
[2/4] usergrid git commit: Removed some comments.
Removed some comments.
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/80ffb354
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/80ffb354
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/80ffb354
Branch: refs/heads/readRepairForIndexValues
Commit: 80ffb35481740cde38b17d82cec699ac8992d009
Parents: 6acc8d3
Author: George Reyes <gr...@apache.org>
Authored: Wed Nov 11 14:50:12 2015 -0800
Committer: George Reyes <gr...@apache.org>
Committed: Wed Nov 11 14:50:12 2015 -0800
----------------------------------------------------------------------
.../usergrid/tools/UniqueIndexCleanup.java | 25 ++++----------------
1 file changed, 5 insertions(+), 20 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/80ffb354/stack/tools/src/main/java/org/apache/usergrid/tools/UniqueIndexCleanup.java
----------------------------------------------------------------------
diff --git a/stack/tools/src/main/java/org/apache/usergrid/tools/UniqueIndexCleanup.java b/stack/tools/src/main/java/org/apache/usergrid/tools/UniqueIndexCleanup.java
index 82378cd..7c1fadd 100644
--- a/stack/tools/src/main/java/org/apache/usergrid/tools/UniqueIndexCleanup.java
+++ b/stack/tools/src/main/java/org/apache/usergrid/tools/UniqueIndexCleanup.java
@@ -339,24 +339,13 @@ public class UniqueIndexCleanup extends ToolBase {
if(mostRecentEntity.getModified() > entity.getModified()){
System.out.println("Deleting "+entity.getUuid().toString()+" because it is the older column in the following rowkey: "+rowKey);
System.out.flush();
- // try {
- em.deleteEntity( entity.getUuid() );
-// }catch(Exception e){
-// System.out.println("Found error when trying to delete the following uuid: "+entity.getUuid()+" Please repair manually or remote debug.");
-// System.out.println(e.getMessage());
-// break;
-// }
+ em.deleteEntity( entity.getUuid() );
+
}
else if (mostRecentEntity.getModified() < entity.getModified()){
System.out.println("Deleting "+mostRecentEntity.getUuid().toString()+" because it is the older column in the following rowkey: "+rowKey);
System.out.flush();
- //try {
- em.deleteEntity( mostRecentEntity.getUuid() );
-// }catch(Exception e){
-// System.out.println("Found error when trying to delete the following uuid: "+mostRecentEntity.getUuid()+" Please repair manually or remote debug.");
-// System.out.println(e.getMessage());
-// break;
-// }
+ em.deleteEntity( mostRecentEntity.getUuid() );
mostRecentEntity = entity;
}
else if (mostRecentEntity.getModified() == entity.getModified() && !mostRecentEntity.getUuid().equals( entity.getUuid() )){
@@ -366,8 +355,7 @@ public class UniqueIndexCleanup extends ToolBase {
}
}
-
-
+
//a safer way to do this would be to try to do another get and verify there is nothing left in the column
//instead of just doing a simple check since the column check happens anywhere between 2 to 1000 times.
if ( cols.size() == numberOfColumnsDeleted ) {
@@ -412,10 +400,7 @@ public class UniqueIndexCleanup extends ToolBase {
if ( cols.size() == 0 ) {
- System.out.println("Zero columns were found for "+ key.toString()+ ". Will delete rowkey.");
-// System.out.println(
-// "Zero entities were found for this unique value. Its possible it doesn't exist or you typed in in"
-// + " wrong :p." );
+ System.out.println( "Zero columns were found for " + key.toString() + ". Will delete rowkey." );
}
entityUUIDDelete( m, applicationId, collectionName, uniqueValueKey, uniqueValue, cols,key.toString() );