Dan Ziemba created HDFS-17843:
---------------------------------

             Summary: FileSystem.createFile() fails with relative path
                 Key: HDFS-17843
                 URL: https://issues.apache.org/jira/browse/HDFS-17843
             Project: Hadoop HDFS
          Issue Type: Bug
          Components: hdfs-client
    Affects Versions: 3.4.2
            Reporter: Dan Ziemba


Attempting to create an HDFS file like below results in 
"IllegalArgumentException: Pathname \{path} from \{path} is not a valid DFS 
filename."

{{fileSystem.createFile(new Path("relative")).build())}}

This works fine using the plain create(path) method instead. Problem appears to 
be with code here that passes variable "f" (the original path) instead of "p" 
(path received by doCall() that should be absolute) to the getPathName() method:
[https://github.com/apache/hadoop/blob/84e8b89ee2ebe6923691205b9e171badde7a495c/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java#L626]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to