Hive
  1. Hive
  2. HIVE-6547

normalize struct Role in metastore thrift interface

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.13.0
    • Fix Version/s: 0.13.0
    • Component/s: Metastore, Thrift API
    • Labels:
      None

      Description

      As discussed in HIVE-5931, it will be cleaner to have the information about Role to role member mapping removed from the Role object, as it is not part of a logical Role. This information not relevant for actions such as creating a Role.
      As part of this change get_role_grants_for_principal api will be added, so that it can be used in place of list_roles, when role mapping information is desired.

      1. HIVE-6547.1.patch
        1.07 MB
        Thejas M Nair
      2. HIVE-6547.nothriftgen.1.patch
        57 kB
        Thejas M Nair
      3. HIVE-6547.thriftapi.2.patch
        2 kB
        Thejas M Nair
      4. HIVE-6547.thriftapi.patch
        2 kB
        Thejas M Nair

        Issue Links

          Activity

          Hide
          Thejas M Nair added a comment -

          HIVE-6547.thriftapi.patch - thrift api change for review

          Show
          Thejas M Nair added a comment - HIVE-6547 .thriftapi.patch - thrift api change for review
          Hide
          Ashutosh Chauhan added a comment -

          Looks good. Do you want to qualify fields in new structs with required ?

          Show
          Ashutosh Chauhan added a comment - Looks good. Do you want to qualify fields in new structs with required ?
          Hide
          Thejas M Nair added a comment - - edited

          Thanks for the feedback. Will make them required.
          While I am at it , i will also make the fields in GetPrincipalsInRoleResponse,GetPrincipalsInRoleRequest required. With the semantics of the functions, it does not make any sense for them to be non-required.
          Those are similar functions that were added recently

          Show
          Thejas M Nair added a comment - - edited Thanks for the feedback. Will make them required. While I am at it , i will also make the fields in GetPrincipalsInRoleResponse,GetPrincipalsInRoleRequest required. With the semantics of the functions, it does not make any sense for them to be non-required. Those are similar functions that were added recently
          Hide
          Thejas M Nair added a comment -

          HIVE-6547.thriftapi.2.patch - addressed thrift api feedback.

          Show
          Thejas M Nair added a comment - HIVE-6547 .thriftapi.2.patch - addressed thrift api feedback.
          Hide
          Thejas M Nair added a comment -

          HIVE-6547.1.patch - includes thrift gen files

          Show
          Thejas M Nair added a comment - HIVE-6547 .1.patch - includes thrift gen files
          Hide
          Thejas M Nair added a comment -

          The patch also remioves additional fields - principalname and principaltype in 'show role grant user user2" output, as that is redundant information. Also removes role createtime from this command output as that is not relevant to role grant information.

          Show
          Thejas M Nair added a comment - The patch also remioves additional fields - principalname and principaltype in 'show role grant user user2" output, as that is redundant information. Also removes role createtime from this command output as that is not relevant to role grant information.
          Hide
          Thejas M Nair added a comment -

          Ran tests locally and they passed.

          Show
          Thejas M Nair added a comment - Ran tests locally and they passed.
          Hide
          Thejas M Nair added a comment -

          Patch committed to 0.13 branch and trunk.
          Thanks for the review Ashutosh!

          Show
          Thejas M Nair added a comment - Patch committed to 0.13 branch and trunk. Thanks for the review Ashutosh!

            People

            • Assignee:
              Thejas M Nair
              Reporter:
              Thejas M Nair
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development