Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-8542

WebHDFS getHomeDirectory behavior does not match specification

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.6.0
    • Fix Version/s: 2.8.0, 3.0.0-alpha1
    • Component/s: webhdfs
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      Per the spec, WebHDFS provides a REST endpoint for getting the user's home directory:

      Submit a HTTP GET request.
      
      curl -i "http://<HOST>:<PORT>/webhdfs/v1/?op=GETHOMEDIRECTORY"

      However, WebHDFSFileSystem.java does not use this, instead building the home directory locally:

        /** @return the home directory. */
        public static String getHomeDirectoryString(final UserGroupInformation ugi) {
          return "/user/" + ugi.getShortUserName();
        }
      
        @Override
        public Path getHomeDirectory() {
          return makeQualified(new Path(getHomeDirectoryString(ugi)));
        }

      The WebHDFSFileSystem client should call to the REST service to determine the home directory.

        Attachments

        1. HDFS-8542-00.patch
          7 kB
          Kanaka Kumar Avvaru
        2. HDFS-8542-01.patch
          9 kB
          Kanaka Kumar Avvaru
        3. HDFS-8542-02.patch
          10 kB
          Kanaka Kumar Avvaru
        4. HDFS-8542-branch-2.7.002.patch
          9 kB
          Jakob Homan

          Issue Links

            Activity

              People

              • Assignee:
                kanaka Kanaka Kumar Avvaru
                Reporter:
                jghoman Jakob Homan
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: