You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2019/12/06 13:44:53 UTC

[GitHub] [hadoop-ozone] ayushtkn opened a new pull request #321: HDDS-2685. Fix Rename API in BasicOzoneFileSystem

ayushtkn opened a new pull request #321: HDDS-2685. Fix Rename API in BasicOzoneFileSystem
URL: https://github.com/apache/hadoop-ozone/pull/321
 
 
   ## What changes were proposed in this pull request?
   
   
   
   In the Rename API :
   1. This doesn't work if one of the path contains URI and other doesn't.
   
       if (src.equals(dst)) {
         return true;
       }
   
   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.
   
   // Some comments here
   public String getFoo()
   {
       return foo;
   }
   
   3. This too doesn't work (similar to 1.)
   
       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;
         }
   
   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.
   
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-2685
   
   ## How was this patch tested?
   
   Added UT.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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