airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From machris...@apache.org
Subject airavata git commit: AIRAVATA-2405 getUsersWithRole debug logging
Date Sun, 09 Jul 2017 04:29:01 GMT
Repository: airavata
Updated Branches:
  refs/heads/develop 45bbc256e -> 226cd3fb7


AIRAVATA-2405 getUsersWithRole debug logging


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/226cd3fb
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/226cd3fb
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/226cd3fb

Branch: refs/heads/develop
Commit: 226cd3fb734c9bdbd8fcb616fd0636c9be409697
Parents: 45bbc25
Author: Marcus Christie <machristie@apache.org>
Authored: Sat Jul 8 23:28:51 2017 -0500
Committer: Marcus Christie <machristie@apache.org>
Committed: Sat Jul 8 23:28:51 2017 -0500

----------------------------------------------------------------------
 .../admin/services/core/impl/TenantManagementKeycloakImpl.java   | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/226cd3fb/airavata-services/profile-service/iam-admin-services-core/src/main/java/org/apache/airavata/service/profile/iam/admin/services/core/impl/TenantManagementKeycloakImpl.java
----------------------------------------------------------------------
diff --git a/airavata-services/profile-service/iam-admin-services-core/src/main/java/org/apache/airavata/service/profile/iam/admin/services/core/impl/TenantManagementKeycloakImpl.java
b/airavata-services/profile-service/iam-admin-services-core/src/main/java/org/apache/airavata/service/profile/iam/admin/services/core/impl/TenantManagementKeycloakImpl.java
index 91c0f4e..fc6af61 100644
--- a/airavata-services/profile-service/iam-admin-services-core/src/main/java/org/apache/airavata/service/profile/iam/admin/services/core/impl/TenantManagementKeycloakImpl.java
+++ b/airavata-services/profile-service/iam-admin-services-core/src/main/java/org/apache/airavata/service/profile/iam/admin/services/core/impl/TenantManagementKeycloakImpl.java
@@ -535,14 +535,17 @@ public class TenantManagementKeycloakImpl implements TenantManagementInterface
{
         try{
             client = TenantManagementKeycloakImpl.getClient(ServerSettings.getIamServerUrl(),
tenantId, realmAdminCreds);
             // FIXME: this only searches through the most recent 100 users for the given
role (assuming there are no more than 10,000 users in the gateway)
+            logger.debug("getUsersWithRole: fetching all users...");
             List<UserRepresentation> allUsers = client.realm(tenantId).users().search(null,
                     null,
                     null,
                     null,
                     0, 10000);
+            logger.debug("getUsersWithRole: all users count=" + allUsers.size());
             allUsers.sort((a, b) -> a.getCreatedTimestamp() - b.getCreatedTimestamp()
> 0 ? -1 : 1);
             // The 100 most recently created users
             List<UserRepresentation> mostRecentUsers = allUsers.subList(0, Math.min(allUsers.size(),
100));
+            logger.debug("getUsersWithRole: most recent users count=" + mostRecentUsers.size());
 
             List<UserProfile> usersWithRole = new ArrayList<>();
             for (UserRepresentation user: mostRecentUsers) {
@@ -556,6 +559,7 @@ public class TenantManagementKeycloakImpl implements TenantManagementInterface
{
                     }
                 }
             }
+            logger.debug("getUsersWithRole: most recent users with role count=" + usersWithRole.size());
             return usersWithRole;
         } catch (ApplicationSettingsException ex) {
             logger.error("Error getting values from property file, reason: " + ex.getMessage(),
ex);


Mime
View raw message