From 3f64c9540d3662e2be5a495d2c01cc2ccc661d9e Mon Sep 17 00:00:00 2001 From: ektavarma10 Date: Thu, 30 Nov 2023 02:34:04 +0530 Subject: [PATCH] add log lines --- .../atlas/authorizer/RangerAtlasAuthorizer.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/auth-plugin-atlas/src/main/java/org/apache/atlas/authorization/atlas/authorizer/RangerAtlasAuthorizer.java b/auth-plugin-atlas/src/main/java/org/apache/atlas/authorization/atlas/authorizer/RangerAtlasAuthorizer.java index 0bc6b5136f..0eb249d6ae 100644 --- a/auth-plugin-atlas/src/main/java/org/apache/atlas/authorization/atlas/authorizer/RangerAtlasAuthorizer.java +++ b/auth-plugin-atlas/src/main/java/org/apache/atlas/authorization/atlas/authorizer/RangerAtlasAuthorizer.java @@ -643,6 +643,8 @@ public void filterTypesDef(AtlasTypesDefFilterRequest request) throws AtlasAutho private void checkAccessAndScrubAsync(List entitiesToCheck, AtlasSearchResultScrubRequest request, boolean isScrubAuditEnabled) throws AtlasAuthorizationException { LOG.info("Creating futures to check access and scrub " + entitiesToCheck.size() + " entities"); + long startTime = System.currentTimeMillis(); + LOG.info("Started checkAccessAndScrubAsync: " + System.currentTimeMillis()); List> completableFutures = entitiesToCheck .stream() .map(entity -> CompletableFuture.supplyAsync(() -> { @@ -654,10 +656,10 @@ private void checkAccessAndScrubAsync(List entitiesToCheck, A } }, entityAccessThreadpool)) .collect(Collectors.toList()); - + LOG.info("Completed async submission " + (System.currentTimeMillis()-startTime)); // wait for all threads to complete their execution CompletableFuture.allOf(completableFutures.toArray(new CompletableFuture[0])).join(); - + LOG.info("Completed waiting for completion of threads: " + (System.currentTimeMillis()-startTime)); // get the first exception from any checkAccessAndScrub calls Optional maybeAuthException = completableFutures .stream() @@ -665,7 +667,7 @@ private void checkAccessAndScrubAsync(List entitiesToCheck, A .filter(Objects::nonNull) .findFirst(); - LOG.info("Async check access and scrub is complete"); + LOG.info("Async check access and scrub is complete: "+ (System.currentTimeMillis()-startTime)); if (maybeAuthException.isPresent()) { throw maybeAuthException.get(); }