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

Exception while renewing a Delegation Token

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.2
    • Fix Version/s: 3.0.0, 2.4.0
    • Component/s: None
    • Labels:
      None

      Description

      I am adding support to Storm Hive Bolt to access Hive meta-store using delegation tokens. I am able to create and cancel delegation tokens using HCatClient. I am getting below exception while renewing a delegation token.

      Exception:
      org.apache.hive.hcatalog.common.HCatException: org.apache.hive.hcatalog.common.HCatException : 9001 : Exception occurred while processing HCat request : MetaException while renewing delegation token.. Cause : MetaException(message:hive/test.cluster.com@EXAMPLE.COM tries to renew a token with renewer hive)
      at org.apache.hive.hcatalog.api.HCatClientHMSImpl.renewDelegationToken(HCatClientHMSImpl.java:643) ~[hive-webhcat-java-client-0.14.0.jar:0.14.0]

      Hadoop's AbstractDelegationTokenIdentifier sets the renewer to Kerberos short name but HCatCleint.renewDelegationToken uses the fullName. This causes the renewal to fail.

      Relevant parts of code: https://github.com/apache/hive/blob/master/shims/common/src/main/java/org/apache/hadoop/hive/thrift/DelegationTokenSecretManager.java#L96

      https://github.com/apache/hadoop/blob/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/AbstractDelegationTokenIdentifier.java#L105

      Let me know If I am missing something.

        Attachments

        1. HIVE-16708.03.patch
          3 kB
          Vihang Karajgaonkar
        2. HIVE-16708.02.patch
          3 kB
          Vihang Karajgaonkar
        3. HIVE-16708.01-branch-2.patch
          3 kB
          Vihang Karajgaonkar

          Issue Links

            Activity

              People

              • Assignee:
                vihangk1 Vihang Karajgaonkar
                Reporter:
                omkreddy Manikumar
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: