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

Can not init HiveMetaStoreClient when using proxy user

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.3.9
    • None
    • Hive
    • None

    Description

      when I use this code to access hms

      UserGroupInformation proxyUser = UserGroupInformation.createProxyUser(proxyUserName, userGroupInformation);
      proxyUser.doAs((PrivilegedExceptionAction<Boolean>) () -> {
          XXXXXX
          return true;
      });
       

      there will throw exception 

      so I debug with this, and find something  maybe wrong in the class named HiveMetaStoreClient:

      because the value of UserGroupInformation.getLoginUser().getRealUser() that in proxy.doas is null, so i change to UserGroupInformation.getLoginUser() and i works

      so what I did is no problem?

      Attachments

        1. image-2022-03-01-16-39-57-935.png
          57 kB
          chenruotao
        2. image-2022-03-01-16-36-52-539.png
          75 kB
          chenruotao
        3. image-2022-03-01-16-33-49-012.png
          142 kB
          chenruotao

        Activity

          People

            Unassigned Unassigned
            chenruotao chenruotao
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: