diff --git a/.github/workflows/chart-release-dispatcher.yaml b/.github/workflows/chart-release-dispatcher.yaml index f9c3de4d0f..763e576c0b 100644 --- a/.github/workflows/chart-release-dispatcher.yaml +++ b/.github/workflows/chart-release-dispatcher.yaml @@ -37,4 +37,4 @@ jobs: "name": "${{ github.repository }}", "branch": "${{ steps.extract_branch.outputs.branch }}" } - } + } \ No newline at end of file diff --git a/auth-agents-common/src/main/java/org/apache/atlas/policytransformer/CachePolicyTransformerImpl.java b/auth-agents-common/src/main/java/org/apache/atlas/policytransformer/CachePolicyTransformerImpl.java index 4a81129a3c..41129bf085 100644 --- a/auth-agents-common/src/main/java/org/apache/atlas/policytransformer/CachePolicyTransformerImpl.java +++ b/auth-agents-common/src/main/java/org/apache/atlas/policytransformer/CachePolicyTransformerImpl.java @@ -148,7 +148,7 @@ public ServicePolicies getPolicies(String serviceName, String pluginId, Long las servicePolicies.setPolicyUpdateTime(new Date()); if (service != null) { - List allPolicies = getServicePolicies(service); + List allPolicies = getServicePolicies(service, 250); servicePolicies.setServiceName(serviceName); servicePolicies.setServiceId(service.getGuid()); @@ -162,7 +162,7 @@ public ServicePolicies getPolicies(String serviceName, String pluginId, Long las AtlasEntityHeader tagService = getServiceEntity(tagServiceName); if (tagService != null) { - allPolicies.addAll(getServicePolicies(tagService)); + allPolicies.addAll(getServicePolicies(tagService, 0)); TagPolicies tagPolicies = new TagPolicies(); @@ -200,13 +200,13 @@ public ServicePolicies getPolicies(String serviceName, String pluginId, Long las return servicePolicies; } - private List getServicePolicies(AtlasEntityHeader service) throws AtlasBaseException, IOException { + private List getServicePolicies(AtlasEntityHeader service, int batchSize) throws AtlasBaseException, IOException { List servicePolicies = new ArrayList<>(); String serviceName = (String) service.getAttribute("name"); String serviceType = (String) service.getAttribute("authServiceType"); - List atlasPolicies = getAtlasPolicies(serviceName); + List atlasPolicies = getAtlasPolicies(serviceName, batchSize); if (CollectionUtils.isNotEmpty(atlasPolicies)) { //transform policies @@ -417,7 +417,7 @@ private List getPolicyValiditySchedule(AtlasEntityHeader return ret; } - private List getAtlasPolicies(String serviceName) throws AtlasBaseException { + private List getAtlasPolicies(String serviceName, int batchSize) throws AtlasBaseException { AtlasPerfMetrics.MetricRecorder recorder = RequestContext.get().startMetricRecord("CachePolicyTransformerImpl."+service+".getAtlasPolicies"); List ret = new ArrayList<>(); @@ -460,6 +460,10 @@ private List getAtlasPolicies(String serviceName) throws Atla int from = 0; int size = 100; + + if (batchSize > 0) { + size = batchSize; + } boolean found = true; do { diff --git a/auth-audits/src/main/java/org/apache/atlas/audit/provider/AuditProviderFactory.java b/auth-audits/src/main/java/org/apache/atlas/audit/provider/AuditProviderFactory.java index 7b67e9c640..c5b04a760c 100644 --- a/auth-audits/src/main/java/org/apache/atlas/audit/provider/AuditProviderFactory.java +++ b/auth-audits/src/main/java/org/apache/atlas/audit/provider/AuditProviderFactory.java @@ -145,8 +145,10 @@ public synchronized void init(Properties props, String appType) { List providers = new ArrayList(); for (Object propNameObj : props.keySet()) { - LOG.info("AUDIT PROPERTY: " + propNameObj.toString() + "=" - + props.getProperty(propNameObj.toString())); + if (LOG.isDebugEnabled()){ + LOG.debug("AUDIT PROPERTY: " + propNameObj.toString() + "=" + + props.getProperty(propNameObj.toString())); + } } // Process new audit configurations diff --git a/common/src/main/java/org/apache/atlas/service/Services.java b/common/src/main/java/org/apache/atlas/service/Services.java index 2d548467fe..5beab35421 100644 --- a/common/src/main/java/org/apache/atlas/service/Services.java +++ b/common/src/main/java/org/apache/atlas/service/Services.java @@ -18,6 +18,7 @@ package org.apache.atlas.service; import org.apache.atlas.annotation.AtlasService; +import org.apache.atlas.type.AtlasType; import org.apache.commons.configuration.Configuration; import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; @@ -27,6 +28,7 @@ import javax.annotation.PostConstruct; import javax.annotation.PreDestroy; import javax.inject.Inject; + import java.util.List; import static org.apache.atlas.AtlasConstants.ATLAS_MIGRATION_MODE_FILENAME; @@ -65,8 +67,8 @@ public void start() { continue; } - LOG.info("Starting service {}", svc.getClass().getName()); + LOG.info("Starting service {}", svc.getClass().getName()); svc.start(); } } catch (Exception e) { diff --git a/repository/src/main/java/org/apache/atlas/GraphTransactionAdvisor.java b/repository/src/main/java/org/apache/atlas/GraphTransactionAdvisor.java index 9751a870c1..d108504b3a 100644 --- a/repository/src/main/java/org/apache/atlas/GraphTransactionAdvisor.java +++ b/repository/src/main/java/org/apache/atlas/GraphTransactionAdvisor.java @@ -38,7 +38,9 @@ public class GraphTransactionAdvisor extends AbstractPointcutAdvisor { public boolean matches(Method method, Class targetClass) { boolean annotationPresent = method.isAnnotationPresent(GraphTransaction.class); if (annotationPresent) { - LOG.info("GraphTransaction intercept for {}.{}", targetClass.getName(), method.getName()); + if (LOG.isDebugEnabled()) { + LOG.debug("GraphTransaction intercept for {}.{}", targetClass.getName(), method.getName()); + } } return annotationPresent; } diff --git a/repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedSearchIndexer.java b/repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedSearchIndexer.java index 5c3410927e..52ec9840ae 100755 --- a/repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedSearchIndexer.java +++ b/repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedSearchIndexer.java @@ -495,7 +495,9 @@ private void resolveIndexFieldName(AtlasGraphManagement managementSystem, AtlasA typeRegistry.addIndexFieldName(attribute.getVertexPropertyName(), indexFieldName); - LOG.info("Property {} is mapped to index field name {}", attribute.getQualifiedName(), attribute.getIndexFieldName()); + if (LOG.isDebugEnabled()){ + LOG.debug("Property {} is mapped to index field name {}", attribute.getQualifiedName(), attribute.getIndexFieldName()); + } } else { LOG.warn("resolveIndexFieldName(attribute={}): propertyKey is null for vertextPropertyName={}", attribute.getQualifiedName(), attribute.getVertexPropertyName()); } diff --git a/repository/src/main/java/org/apache/atlas/repository/ogm/DTORegistry.java b/repository/src/main/java/org/apache/atlas/repository/ogm/DTORegistry.java index 43f4a602ce..5879a028a9 100644 --- a/repository/src/main/java/org/apache/atlas/repository/ogm/DTORegistry.java +++ b/repository/src/main/java/org/apache/atlas/repository/ogm/DTORegistry.java @@ -35,7 +35,9 @@ public class DTORegistry { @Inject public DTORegistry(Set availableDTOs) { for (DataTransferObject availableDTO : availableDTOs) { - LOG.info("Registering DTO: {}", availableDTO.getClass().getSimpleName()); + if (LOG.isDebugEnabled()){ + LOG.debug("Registering DTO: {}", availableDTO.getClass().getSimpleName()); + } registerDTO(availableDTO); } }