[
https://issues.apache.org/jira/browse/RANGER-4692?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17895530#comment-17895530
]
Dineshkumar Yadav commented on RANGER-4692:
-------------------------------------------
Hi [~madhan], can you please review above approach.
Thanks
> Sorting on the Ranger Admin - Plugin Status page by event(Download,Activation)
> ------------------------------------------------------------------------------
>
> Key: RANGER-4692
> URL: https://issues.apache.org/jira/browse/RANGER-4692
> Project: Ranger
> Issue Type: New Feature
> Components: Ranger
> Reporter: Rakesh Gupta
> Assignee: Rakesh Gupta
> Priority: Major
>
> 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.
> *Design Approach*
> # Update ranger table x_plugin_info by adding below new columns to handle
> sorting of plugin status.
> {code:java}
> policy_download_time bigint(20) DEFAULT NULL
> policy_activation_time bigint(20) DEFAULT NULL
> tag_download_time bigint(20) DEFAULT NULL
> tag_activation_time bigint(20) DEFAULT NULL
> gds_download_time bigint(20) DEFAULT NULL
> gds_activation_time bigint(20) DEFAULT NULL
> role_download_time bigint(20) DEFAULT NULL
> role_activation_time bigint(20) DEFAULT NULL
> userstore_download_time bigint(20) DEFAULT NULL
> userstore_activation_time bigint(20) DEFAULT NULL
> cluster_name varchar(255) DEFAULT NULL
> {code}
> # create indexing for each new column.
> # create a view vx_plugin_info table to capture all plugins status details.
> # vx_plugin_info will fetch plugin info data from x_plugin_info,
> x_service_version_info, x_service_def table.
> *Ranger changes*
> # For Upgrade, we will provide DB and Java Patches.
> # DB Patches will add a new column to the x_plugin_info table and add
> indexes on each newly added column of the x_plugin_info table to optimize
> query performance.
> # After adding the new columns to the x_plugin_info table, will create a
> view table (vx_plugin_info) that fetches data from multiple tables
> (x_plugin_info, x_service_version_info, x_service_def).
> # After the database is updated, Java patches will update values into the
> new column of the x_plugin_info table.
> *API changes*
> 1.Plugin Status GET APIs for Sorting:
> {code:java}
> /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
> /service/plugins/info?sortType=desc&sortBy=pluginIpAddress
> {code}
> 2.Plugin Status GET APIs for Searching:
> {code:java}
> /service/plugins/info?serviceType={serviceTypeName}
> /service/plugins/info?clusterName={clusterName}
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)