ranger-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mad...@apache.org
Subject [1/6] incubator-ranger git commit: RANGER-705:Ranger Usersync should provide summary logs on the sync progress instead of not loggin any details after 2000 users
Date Wed, 28 Oct 2015 00:20:39 GMT
Repository: incubator-ranger
Updated Branches:
  refs/heads/tag-policy 757d1eb21 -> a03a31749


RANGER-705:Ranger Usersync should provide summary logs on the sync progress instead of not
loggin any details after 2000 users


Project: http://git-wip-us.apache.org/repos/asf/incubator-ranger/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ranger/commit/11f73cd8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ranger/tree/11f73cd8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ranger/diff/11f73cd8

Branch: refs/heads/tag-policy
Commit: 11f73cd8ada0776b90f611ccacb7f0dd4fa7a780
Parents: bc4ee64
Author: rmani <rmani@hortonworks.com>
Authored: Tue Oct 27 11:30:16 2015 -0700
Committer: rmani <rmani@hortonworks.com>
Committed: Tue Oct 27 11:30:16 2015 -0700

----------------------------------------------------------------------
 .../ldapusersync/process/LdapUserGroupBuilder.java       | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/11f73cd8/ugsync/src/main/java/org/apache/ranger/ldapusersync/process/LdapUserGroupBuilder.java
----------------------------------------------------------------------
diff --git a/ugsync/src/main/java/org/apache/ranger/ldapusersync/process/LdapUserGroupBuilder.java
b/ugsync/src/main/java/org/apache/ranger/ldapusersync/process/LdapUserGroupBuilder.java
index 66c6e28..63643c0 100644
--- a/ugsync/src/main/java/org/apache/ranger/ldapusersync/process/LdapUserGroupBuilder.java
+++ b/ugsync/src/main/java/org/apache/ranger/ldapusersync/process/LdapUserGroupBuilder.java
@@ -378,11 +378,18 @@ public class LdapUserGroupBuilder implements UserGroupSource {
 								+ ", userName: " + userName + ", groupList: "
 								+ groupList);
 						}
+						if ( counter == 2000 ) {
+							LOG.info("===> 2000 user records have been synchronized so far. From now on, only
a summary progress log will be written for every 100 users. To continue to see detailed log
for every user, please enable Trace level logging. <===");
+						}
 					} else {
 						if (LOG.isTraceEnabled()) {
 							LOG.trace("Updating user count: " + counter
-								+ ", userName: " + userName + ", groupList: "
-								+ groupList);
+									+ ", userName: " + userName + ", groupList: "
+									+ groupList);
+						} else  {
+							if ( counter % 100 == 0) {
+								LOG.info("Synced " + counter + " users till now");
+							}
 						}
 					}
 					try {


Mime
View raw message