Ayush Saxena created HDFS-15035: ----------------------------------- Summary: Fix Rename API in BasicOzoneFileSystem Key: HDFS-15035 URL: https://issues.apache.org/jira/browse/HDFS-15035 Project: Hadoop HDFS Issue Type: Bug Reporter: Ayush Saxena Assignee: Ayush Saxena
In the Rename API : 1. This doesn't work if one of the path contains URI and other doesn't. {code:java} if (src.equals(dst)) { return true; } {code} 2. This check is suppose to be done only for directories, but is done for Files too, it can be moved after getting the FileStatus and checking the type. {code:java} // Some comments here public String getFoo() { return foo; } {code} 3. This too doesn't work (similar to 1.) {code:java} if (srcStatus.isDirectory()) { if (dst.toString().startsWith(src.toString() + OZONE_URI_DELIMITER)) { LOG.trace("Cannot rename a directory to a subdirectory of self"); return false; } {code} 4. Rename is even success if the URI provided is of different FileSystem. In general HDFS/Other FS shall throw IllegalArgumentException if the path doesn't belong to the same FS. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-dev-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-dev-h...@hadoop.apache.org