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

Add method to get path start position without drive specifier in o.a.h.fs.Path

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 2.2.0, 3.0.0-alpha1
    • 2.3.0
    • fs
    • None
    • Reviewed

    Description

      There are a lot of code in Path to get start position after skipping drive specifier, like:

          int start = hasWindowsDrive(uri.getPath()) ? 3 : 0;
      

      Also there is a minor bug in mergePaths:
      mergePath("/", "/foo") will yield Path("//foo") which will be parsed as uri authority, not path.

      Attachments

        1. HADOOP-9897.v1.patch
          6 kB
          Binglin Chang
        2. HADOOP-9897.v2.patch
          5 kB
          Binglin Chang
        3. HADOOP-9897.v2.patch
          5 kB
          Binglin Chang
        4. HADOOP-9897.v3.patch
          6 kB
          Binglin Chang
        5. HADOOP-9897.v4.patch
          6 kB
          Binglin Chang
        6. HADOOP-9897.v5.patch
          5 kB
          Binglin Chang
        7. HADOOP-9897.v6.patch
          6 kB
          Binglin Chang

        Activity

          People

            decster Binglin Chang
            decster Binglin Chang
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: