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

Improve performance of filtering Hive SHOW commands

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.7.0
    • None
    • 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.007.patch
          19 kB
          Colin
        2. SENTRY-565.006.patch
          19 kB
          Colin
        3. SENTRY-565.005.patch
          98 kB
          Colin
        4. SENTRY-565.004.patch
          95 kB
          Colin
        5. SENTRY-565.003.patch
          53 kB
          Colin
        6. SENTRY-565.002.patch
          37 kB
          Colin
        7. SENTRY-565.001.patch
          38 kB
          Colin

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: