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

DDL operations via WebHCat with doAs parameter in secure cluster fail

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 0.14.0
    • 0.14.0
    • WebHCat
    • None

    Description

      webhcat handles DDL command by forking to 'hcat', i.e. HCatCli
      This starts a session.

      SessionState.start() creates scratch dir based on current user name
      via startSs.createSessionDirs(sessionUGI.getShortUserName());

      This UGI is not aware of doAs param, so the name of the dir always ends up 'hcat', but because a delegation token is generated in WebHCat for HDFS access, the owner of the scratch dir is the calling user. Thus next time a session is started (because of a new DDL call from different user), it ends up trying to use the same scratch dir but cannot as it has 700 permission set.

      We need to pass in doAs user into SessionState

      Attachments

        1. HIVE-8643.patch
          2 kB
          Eugene Koifman
        2. HIVE-8643.2.patch
          2 kB
          Eugene Koifman
        3. HIVE-8643.3.patch
          3 kB
          Eugene Koifman

        Issue Links

          Activity

            People

              ekoifman Eugene Koifman
              ekoifman Eugene Koifman
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: