Uploaded image for project: 'Ranger'
  1. Ranger
  2. RANGER-4692

Sorting on the Ranger Admin - Plugin Status page by event(Download,Activation)

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Ranger
    • 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

      1. 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
        
      2. create indexing for each new column.
      3. create a view vx_plugin_info table to capture all plugins status details.
      4. vx_plugin_info will fetch plugin info data from x_plugin_info, x_service_version_info, x_service_def table.

      Ranger changes

      1. For Upgrade, we will provide DB and Java Patches.
      2. 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.
      3. 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).
      4. 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}
      

      Attachments

        Activity

          People

            rakeshgupta264 Rakesh Gupta
            rakeshgupta264 Rakesh Gupta
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: