Details
-
New Feature
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
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.
Design Approach
- Update ranger table x_plugin_info by adding below new columns to handle sorting of plugin status.
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
- 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:
/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
2.Plugin Status GET APIs for Searching:
/service/plugins/info?serviceType={serviceTypeName} /service/plugins/info?clusterName={clusterName}