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

Path.suffix() raises an exception when the path is in the root dir

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.3.1
    • None
    • fs
    • None

    Description

      Root cause of SPARK-34298.

      If you have a Path (/something) and call suffix on it.

       new Path("/something").suffix("else")
      

      you see an error because the path doesn't have a parent

      Exception in thread "main" java.lang.IllegalArgumentException: Can not create a Path from an empty string
      at org.apache.hadoop.fs.Path.checkPathArg(Path.java:168)[....]
      at org.apache.hadoop.fs.Path.suffix(Path.java:446)
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              stevel@apache.org Steve Loughran
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated: