You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Ivan Andika (Jira)" <ji...@apache.org> on 2024/07/02 10:33:00 UTC

[jira] [Created] (HADOOP-19217) Introduce getTrashPolicy to FileSystem API

Ivan Andika created HADOOP-19217:
------------------------------------

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


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 couple the TrashPolicy for each specific FileSystem implementation by introducing a new FileSystem#getTrashPolicy. 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: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org