[ 
https://issues.apache.org/jira/browse/HADOOP-19217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17862393#comment-17862393
 ] 

Steve Loughran commented on HADOOP-19217:
-----------------------------------------

ok, in HADOOP-18013 I tried to start on this with an fs.SCHEME.trash policy; 
having a full API would be even more agile

* see the javadoc comments in the top of FileSystem.java about implementing any 
new filesystem api
* needs matching coverage in filestystem.md specification and a contract test. 

> Introduce getTrashPolicy to FileSystem API
> ------------------------------------------
>
>                 Key: HADOOP-19217
>                 URL: https://issues.apache.org/jira/browse/HADOOP-19217
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: fs
>            Reporter: Ivan Andika
>            Priority: Major
>
> Hadoop FileSystem supports multiple FileSystem implementations awareness 
> (e.g. client is aware of both hdfs:// and ofs:// protocols).
> However, it seems that currently Hadoop TrashPolicy remains the same 
> regardless of the URI scheme. The TrashPolicy is governed by 
> "fs.trash.classname" configuration and stays the same regardless of the 
> FileSystem implementation. For example, HDFS defaults to TrashPolicyDefault 
> and Ozone defaults to TrashPolicyOzone, but only one will be picked since the 
> the configuration will be overwritten by the other.
> Therefore, I propose to tie the TrashPolicy implementation to each FileSystem 
> implementation by introducing a new FileSystem#getTrashPolicy interface. 
> TrashPolicy#getInstance can call FileSystem#getTrashPolicy to get the 
> appropriate TrashPolicy.



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