Skip to content

Commit

Permalink
feat: make pagination size configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
sumandas0 committed Dec 1, 2023
1 parent 966b494 commit 4fddf2a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
package org.apache.atlas.plugin.util;

import com.google.common.util.concurrent.ThreadFactoryBuilder;
import org.apache.atlas.AtlasConfiguration;
import org.apache.atlas.RequestContext;
import org.apache.atlas.exception.AtlasBaseException;
import org.apache.atlas.plugin.model.RangerRole;
Expand All @@ -30,6 +31,7 @@
import org.keycloak.representations.idm.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.commons.configuration.Configuration;

import java.util.*;
import java.util.concurrent.Callable;
Expand Down Expand Up @@ -388,7 +390,7 @@ public RangerRole call() throws Exception {
//get all groups for Roles
Thread groupsFetcher = new Thread(() -> {
int start = 0;
int size = 500;
int size = AtlasConfiguration.KEYCLOAK_ADMIN_API_RESOURCE_PAGINATION_SIZE.getInt();
boolean found = true;
Set<GroupRepresentation> ret = new HashSet<>();

Expand Down
3 changes: 2 additions & 1 deletion intg/src/main/java/org/apache/atlas/AtlasConfiguration.java
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ public enum AtlasConfiguration {
SEARCH_LOGGER_MAX_THREADS("atlas.enable.search.logger.max.threads", 20),

PERSONA_POLICY_ASSET_MAX_LIMIT("atlas.persona.policy.asset.maxlimit", 1000),
ENABLE_KEYCLOAK_TOKEN_INTROSPECTION("atlas.canary.keycloak.token-introspection", false);
ENABLE_KEYCLOAK_TOKEN_INTROSPECTION("atlas.canary.keycloak.token-introspection", false),
KEYCLOAK_ADMIN_API_RESOURCE_PAGINATION_SIZE("atlas.keycloak.admin.resource-pagination-size", 500);


private static final Configuration APPLICATION_PROPERTIES;
Expand Down

0 comments on commit 4fddf2a

Please sign in to comment.