You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Steve Loughran (Jira)" <ji...@apache.org> on 2021/06/03 17:54:00 UTC

[jira] [Created] (HADOOP-17744) Path.suffix() raises an exception when the path is in the root dir

Steve Loughran created HADOOP-17744:
---------------------------------------

             Summary: Path.suffix() raises an exception when the path is in the root dir
                 Key: HADOOP-17744
                 URL: https://issues.apache.org/jira/browse/HADOOP-17744
             Project: Hadoop Common
          Issue Type: Bug
          Components: fs
    Affects Versions: 3.3.1
            Reporter: Steve Loughran


Root cause of SPARK-34298.

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

{code}
 new Path("/something").suffix("else")
{code}
you see an error because the path doesn't have a parent

{code}
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)
{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-dev-help@hadoop.apache.org