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 2020/07/18 01:08:00 UTC

[GitHub] [hadoop-ozone] umamaheswararao edited a comment on pull request #1215: HDDS-3982. Disable moveToTrash in o3fs and ofs temporarily

umamaheswararao edited a comment on pull request #1215:
URL: https://github.com/apache/hadoop-ozone/pull/1215#issuecomment-660398646


   @smengcl Thank you for working on it.
   This is a good idea.
   
   - But the below log message from could confuse people?
   ```
    fs.rename(path, trashPath,
               Rename.TO_TRASH);
           LOG.info("Moved: '" + path + "' to trash at: " + trashPath);
   ```
   I don't see a way to avoid though. :-(
   Probably we will say: A generic statement in previous log  "We will not retain any data in trash. This may just reduce confusion that, they will think data moved but deleted immediately. :-) 
   
   Probably your logs will looks like:
   INFO ozone.BasicOzoneFileSystem: Move to trash is disabled for o3fs, deleting instead: o3fs://bucket2.volume1.om/dir3/key5.
                                                                 Files/dirs will not be retained in Trash.
   INFO fs.TrashPolicyDefault: Moved: 'o3fs://bucket2.volume1.om/dir3/key5' to trash at: /.Trash/hadoop/Current/dir3/key5
   I am not this is confusing more. Think about some generic message to convey that next message is just fake.
   
   - I think we need to add test case to make sure no files moving under trash folder.
   
   
   One another thought could be that: ( I am not proposing it to do it now, just for discussion):
   Currently in Hadoop side, the trash policy config is common for all kinds of fs.
   ```
    Class<? extends TrashPolicy> trashClass = conf.getClass(
           "fs.trash.classname", TrashPolicyDefault.class, TrashPolicy.class);
       TrashPolicy trash = ReflectionUtils.newInstance(trashClass, conf);
       trash.initialize(conf, fs); // initialize TrashPolicy
       return trash
   ```
   If user wants different policies based on their FS behaviors, that's not possible. Probably if we have confg like fs.<scheme>.trash.classname and by default we can use TrashPolicyDefault.class. if user wants, they can configure per fs specific policy. 
   So, If config was defined this way, our life would have been easier now. In our case we could have configured our own policy and simply delete the files in it. 
   Anyway what we are doing is temporary until we have proper cleanup. So, this option will not help as we need changes in Hadoop side.
   
   
   


----------------------------------------------------------------
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



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