Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-571

Path should use URI syntax

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.10.0
    • fs
    • None

    Description

      The following changes are proposed:
      1. Add a factory/registry of FileSystem implementations. Given a protocol, hostname and port, it should be possible to get a FileSystem implementation.
      2. Path's constructor should accept URI-formatted strings & a configuration.
      3. A new Path method should be added: FileSystem.getFileSystem(). This returns the filesystem named in the path or the default configured filesystem.
      4. Most methods which currently take FileSystem and Path parameters can be changed to take only Path.
      5. Many FileSystem operations (create, open, delete, list, etc.) can become convenience methods on Path.
      6. A URLStreamHandler can be defined in terms of the FileSystem API, so that URLs for any protocol with a registered FileSystem implementation can be accessed with a java.net.URL, permitting FileSystem implementations to be used on the classpath, etc.

      It is tempting to try to replace Path with java.net.URL, but URL's methods are insufficient for mapreduce. We require directory listings, random access, location hints, etc., which are not supported by existing URLStreamHandler implementations. But we can expose all FileSystem implementations for access with java.net.URL.

      (From a brainstorm with Owen.)

      Attachments

        1. uri5.patch
          42 kB
          Doug Cutting
        2. uri4.patch
          42 kB
          Doug Cutting
        3. uri3.patch
          41 kB
          Doug Cutting
        4. uri2.patch
          39 kB
          Doug Cutting
        5. uri.patch
          37 kB
          Doug Cutting

        Issue Links

          Activity

            People

              cutting Doug Cutting
              cutting Doug Cutting
              Votes:
              4 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: