Uploaded image for project: 'Sentry'
  1. Sentry
  2. SENTRY-565

Improve performance of filtering Hive SHOW commands

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.7.0
    • Component/s: None
    • Labels:
      None

      Description

      Currently, when get the metadata from hive, eg, "show tables", "show databases". Sentry will filter the result and output the authorized entities. There will be many RPC calls when filtering the result. The related code is in HiveAuthzBinding, for example, in filterShowTables:

      ......
      for (String tableName : queryResult) {
        ......
        hiveAuthzBinding.authorize(operation, tableMetaDataPrivilege, subject, inputHierarchy,
                  outputHierarchy, providedPrivileges);
        ......
      }
      ......
      

      hiveAuthzBinding.authorize will get the privileges from sentry service, if there are many tables in the hive, the filtering process will spend much time. Considering sentry also need to filter the column, HiveAuthzBinding should be improved to reduce the number of rpc calls when doing the filter.

        Attachments

        1. SENTRY-565.001.patch
          38 kB
          Colin
        2. SENTRY-565.002.patch
          37 kB
          Colin
        3. SENTRY-565.003.patch
          53 kB
          Colin
        4. SENTRY-565.004.patch
          95 kB
          Colin
        5. SENTRY-565.005.patch
          98 kB
          Colin
        6. SENTRY-565.006.patch
          19 kB
          Colin
        7. SENTRY-565.007.patch
          19 kB
          Colin

          Issue Links

            Activity

              People

              • Assignee:
                colin Colin
                Reporter:
                colin Colin
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: