Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-22512

Use direct SQL to fetch column privileges in refreshPrivileges

    XMLWordPrintableJSON

Details

    Description

      refreshPrivileges() callsĀ listTableAllColumnGrants() to fetch the column level privileges. The later function retrieves the individual column objects by firing one query per column privilege object, thus causing the backend db to be swamped by these queries when PrivilegeSynchronizer is run. PrivilegeSynchronizer synchronizes privileges of all the databases, tables and columns and thus the backend db can get swamped really bad when there are thousands of tables with hundreds of columns.

      The output of listTableAllColumnGrants() is not used completely so all the columns the PM has tried to retrieves anyway goes waste.

      Fix this by using direct SQL to fetch column privileges.

      Attachments

        1. HIVE-22512.01.patch
          11 kB
          Ashutosh Bapat
        2. HIVE-22512.02.patch
          11 kB
          Ashutosh Bapat
        3. HIVE-22512.03.patch
          11 kB
          Ashutosh Bapat

        Issue Links

          Activity

            People

              ashutosh.bapat Ashutosh Bapat
              ashutosh.bapat Ashutosh Bapat
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 50m
                  1h 50m