-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/75238/#review227050
-----------------------------------------------------------




security-admin/src/main/java/org/apache/ranger/service/RangerPluginInfoService.java
Line 304 (original), 299 (patched)
<https://reviews.apache.org/r/75238/#comment315343>

    Can hasAssociatedTagService flag be replaced with checking if 
xObj.getLatestTagVersion() is null?
    
    If yes, searchRangerPluginInfo() can be simplified to not retrieve 
servicesWithTagService and objectsList.


- Madhan Neethiraj


On Nov. 11, 2024, 11:53 a.m., Rakesh Gupta wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/75238/
> -----------------------------------------------------------
> 
> (Updated Nov. 11, 2024, 11:53 a.m.)
> 
> 
> Review request for ranger, Dineshkumar Yadav, Kishor Gollapalliwar, Abhay 
> Kulkarni, Madhan Neethiraj, Mehul Parikh, Pradeep Agrawal, Ramesh Mani, 
> sanket shelar, Sailaja Polavarapu, and Velmurugan Periasamy.
> 
> 
> Bugs: RANGER-4692
>     https://issues.apache.org/jira/browse/RANGER-4692
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> Currently there are different type like (Policy, Role, Tag, UserStore and 
> GDS) on plugin status.
> 
> when we have plugins(large enough to accommodate in single page), It will be 
> helpful to identify any out-of-sync plugins based on download times, sorting 
> them by policyDownloadTime, tagDownloadTime, roleDownloadTime, 
> userstoreDownloadTime and gdsDownloadTime.
> 
> 
> Diffs
> -----
> 
>   
> agents-common/src/main/java/org/apache/ranger/plugin/model/RangerPluginInfo.java
>  8d46b99f7 
>   security-admin/db/mysql/optimized/current/ranger_core_db_mysql.sql 
> 5fb0d95db 
>   security-admin/db/mysql/patches/076-add-columns-in-x_plugin_info.sql 
> PRE-CREATION 
>   security-admin/db/oracle/optimized/current/ranger_core_db_oracle.sql 
> 593cffe56 
>   security-admin/db/oracle/patches/076-add-columns-in-x_plugin_info.sql 
> PRE-CREATION 
>   security-admin/db/postgres/optimized/current/ranger_core_db_postgres.sql 
> 16263a2d7 
>   security-admin/db/postgres/patches/076-add-columns-in-x_plugin_info.sql 
> PRE-CREATION 
>   
> security-admin/db/sqlanywhere/optimized/current/ranger_core_db_sqlanywhere.sql
>  fa9832314 
>   security-admin/db/sqlanywhere/patches/076-add-columns-in-x_plugin_info.sql 
> PRE-CREATION 
>   security-admin/db/sqlserver/optimized/current/ranger_core_db_sqlserver.sql 
> a0e47004b 
>   security-admin/db/sqlserver/patches/076-add-columns-in-x_plugin_info.sql 
> PRE-CREATION 
>   security-admin/src/main/java/org/apache/ranger/biz/AssetMgr.java 620d1e619 
>   security-admin/src/main/java/org/apache/ranger/entity/XXPluginInfo.java 
> a15d8d056 
>   
> security-admin/src/main/java/org/apache/ranger/entity/view/VXXPluginInfo.java 
> PRE-CREATION 
>   
> security-admin/src/main/java/org/apache/ranger/patch/PatchForPluginStatusEventSorting_J10064.java
>  PRE-CREATION 
>   
> security-admin/src/main/java/org/apache/ranger/service/RangerPluginInfoService.java
>  9dc26ceb7 
> 
> 
> Diff: https://reviews.apache.org/r/75238/diff/4/
> 
> 
> Testing
> -------
> 
> Tested and verified that the plugins are correctly sorted by event type 
> (Policy, Role, Tag, UserStore, GDS) using the following APIs:
> 
> /service/plugins/info?sortType=desc&sortBy=policyDownloadTime
> /service/plugins/info?sortType=desc&sortBy=policyActivationTime
> /service/plugins/info?sortType=desc&sortBy=lastPolicyUpdateTime
> /service/plugins/info?sortType=desc&sortBy=tagDownloadTime
> /service/plugins/info?sortType=desc&sortBy=tagActivationTime
> /service/plugins/info?sortType=desc&sortBy=lasttagUpdateTime
> /service/plugins/info?sortType=desc&sortBy=gdsDownloadTime
> /service/plugins/info?sortType=desc&sortBy=gdsActivationTime
> /service/plugins/info?sortType=desc&sortBy=lastgdsUpdateTime
> /service/plugins/info?sortType=desc&sortBy=roleDownloadTime
> /service/plugins/info?sortType=desc&sortBy=roleActivationTime
> /service/plugins/info?sortType=desc&sortBy=lastroleUpdateTime
> /service/plugins/info?sortType=desc&sortBy=userstoreDownloadTime
> /service/plugins/info?sortType=desc&sortBy=userstoreActivationTime
> /service/plugins/info?sortType=desc&sortBy=clusterName
> /service/plugins/info?sortType=desc&sortBy=serviceType
> 
> Also tested filtering by:
> /service/plugins/info?serviceType={serviceTypeName}
> /service/plugins/info?clusterName={clusterName}
> 
> 
> Tested Java patch for upgrade scenario: completed processing 50,005 records 
> in 12 seconds.
> Here’s are contents from ranger_db_patch.log:
> 
> 2024-11-11 15:14:57,286 [main] INFO  Found 50005 plugin info records to 
> process.
> 2024-11-11 15:14:57,909 [Thread-12] INFO  PROGRESS: 1000 plugin status 
> records processed.
> 2024-11-11 15:14:58,357 [Thread-14] INFO  PROGRESS: 2000 plugin status 
> records processed.
> ...
> 2024-11-11 15:15:08,726 [Thread-13] INFO  PROGRESS: 48000 plugin status 
> records processed.
> 2024-11-11 15:15:09,129 [Thread-12] INFO  PROGRESS: 50000 plugin status 
> records processed.
> 2024-11-11 15:15:09,134 [main] INFO  Loading completed! Time taken=12secs, 
> 311ms
> 2024-11-11 15:15:09,134 [Loader Monitor] INFO  Monitor Thread exiting!!!
> 2024-11-11 15:15:09,198 [main] INFO  Load complete. Exiting!
> 
> 
> Thanks,
> 
> Rakesh Gupta
> 
>

Reply via email to