usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject [24/50] [abbrv] incubator-usergrid git commit: Don't ignore broken user accounts (i.e. no creds or orgs), export everything.
Date Fri, 24 Jul 2015 15:21:52 GMT
Don't ignore broken user accounts (i.e. no creds or orgs), export everything.


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

Branch: refs/heads/USERGRID-869
Commit: 897fd5083feeab041fd44453abeb2db57efa4614
Parents: 4f8aa2f
Author: Dave Johnson <snoopdave@apache.org>
Authored: Mon Jul 20 10:37:54 2015 -0400
Committer: Dave Johnson <snoopdave@apache.org>
Committed: Mon Jul 20 10:37:54 2015 -0400

----------------------------------------------------------------------
 .../src/main/java/org/apache/usergrid/tools/ExportAdmins.java | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/897fd508/stack/tools/src/main/java/org/apache/usergrid/tools/ExportAdmins.java
----------------------------------------------------------------------
diff --git a/stack/tools/src/main/java/org/apache/usergrid/tools/ExportAdmins.java b/stack/tools/src/main/java/org/apache/usergrid/tools/ExportAdmins.java
index 9dce862..d5dd42c 100644
--- a/stack/tools/src/main/java/org/apache/usergrid/tools/ExportAdmins.java
+++ b/stack/tools/src/main/java/org/apache/usergrid/tools/ExportAdmins.java
@@ -80,6 +80,8 @@ public class ExportAdmins extends ExportingToolBase {
     private int readThreadCount;
 
     AtomicInteger userCount = new AtomicInteger( 0 );
+    
+    boolean ignoreInvalidUsers = false; // true to ignore users with no credentials or orgs
    
     
     /**
@@ -335,9 +337,10 @@ public class ExportAdmins extends ExportingToolBase {
 
                     String actionTaken = "Processed";
 
-                    if (task.orgNamesByUuid.isEmpty()
+                    if (ignoreInvalidUsers && (task.orgNamesByUuid.isEmpty()
                             || task.dictionariesByName.isEmpty()
-                            || task.dictionariesByName.get( "credentials" ).isEmpty()) {
+                            || task.dictionariesByName.get( "credentials" ).isEmpty())) {
+                        
                         actionTaken = "Ignored";
                         
                     } else {


Mime
View raw message