Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-5274

ConnectionQueryServiceImpl#ensureNamespaceCreated and ensureTableCreated should use HBase APIs that do not require ADMIN permissions for existence checks

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Patch Available
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 5.0.0, 4.15.0, 4.14.2
    • Fix Version/s: 5.0.0, 4.15.1
    • Labels:
      None

      Description

      HBASE-22377 will introduce a new API that does not require ADMIN permissions to check the existence of a namespace.

      Currently, CQSI#ensureNamespaceCreated calls HBaseAdmin#getNamespaceDescriptor which eventually on the server causes a call to AccessController#preGetNamespaceDescriptor. This tries to acquire ADMIN permissions on the namespace. We should ideally use the new API provided by HBASE-22377 which does not require the phoenix client to get ADMIN permissions on the namespace. We should acquire ADMIN permissions only in case we need to create the namespace if it doesn't already exist.

      Similarly, CQSI#ensureTableCreated should first check the existence of a table before trying to do HBaseAdmin#getTableDescriptor since this requires CREATE and ADMIN permissions.

        Attachments

        1. PHOENIX-5274.4.x-HBase-1.5.v1.patch
          14 kB
          Ankit Jain
        2. PHOENIX-5274.4.x-HBase-1.5.v2.patch
          31 kB
          Ankit Jain
        3. PHOENIX-5274.4.x-HBase-1.5.v3.patch
          14 kB
          Ankit Jain

          Issue Links

            Activity

              People

              • Assignee:
                jainankit Ankit Jain
                Reporter:
                ckulkarni Chinmay Kulkarni
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Time Tracking

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