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

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsAdd voteVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned Assign to me
            stevel@apache.org Steve Loughran

            Dates

              Created:
              Updated:

              Slack

                Issue deployment