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

WebHDFS getHomeDirectory behavior does not match specification

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.6.0
    • 2.8.0, 3.0.0-alpha1
    • webhdfs
    • None
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: