This is an automated email from the ASF dual-hosted git repository.
msingh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git
The following commit(s) were added to refs/heads/master by this push:
new 2b70185 HDDS-5533. Update Documentation for Trash (#2505)
2b70185 is described below
commit 2b70185ee3c48da5f664340624ef451793544480
Author: Sadanand Shenoy <[email protected]>
AuthorDate: Tue Aug 17 06:35:57 2021 +0530
HDDS-5533. Update Documentation for Trash (#2505)
---
hadoop-hdds/docs/content/interface/Ofs.md | 28 +++++++++++++++++++++-------
1 file changed, 21 insertions(+), 7 deletions(-)
diff --git a/hadoop-hdds/docs/content/interface/Ofs.md
b/hadoop-hdds/docs/content/interface/Ofs.md
index 0f552c3..66cf2b7 100644
--- a/hadoop-hdds/docs/content/interface/Ofs.md
+++ b/hadoop-hdds/docs/content/interface/Ofs.md
@@ -110,10 +110,6 @@ hdfs dfs -put /etc/hosts /volume1/bucket1/test
For more usage, see:
https://issues.apache.org/jira/secure/attachment/12987636/Design%20ofs%20v1.pdf
-## Special note
-
-Trash is disabled even if `fs.trash.interval` is set on purpose. (HDDS-3982)
-
## Differences from [o3fs]({{< ref "interface/O3fs.md" >}})
### Creating files
@@ -198,6 +194,20 @@ $ ozone fs -touch /tmp/key1
## Delete with trash enabled
+In order to enable trash in Ozone, Please add these configs to core-site.xml
+
+{{< highlight xml >}}
+<property>
+<name>fs.trash.interval</name>
+<value>10</value>
+</property>
+<property>
+<name>fs.trash.classname</name>
+<value>org.apache.hadoop.ozone.om.TrashPolicyOzone</value>
+</property>
+{{< /highlight >}}
+
+
When keys are deleted with trash enabled, they are moved to a trash directory
under each bucket, because keys aren't allowed to be moved(renamed) between
buckets in Ozone.
@@ -209,6 +219,13 @@ $ ozone fs -rm /volume1/bucket1/key1
This is very similar to how the HDFS encryption zone handles trash location.
+**Note**
+
+ 1.The flag `-skipTrash` can be used to delete files permanently without being
moved to trash.
+
+ 2.Deletes at bucket or volume level with trash enabled are not allowed. One
must use skipTrash in such cases.
+ i.e `ozone fs -rm -R ofs://vol1/bucket1` or `ozone fs -rm -R
o3fs://bucket1.vol1` are not allowed without skipTrash
+
## Recursive listing
OFS supports recursive volume, bucket and key listing.
@@ -222,6 +239,3 @@ This feature wouldn't degrade server performance as the
loop is on the client.
Think it as a client is issuing multiple requests to the server to get all the
information.
-## Special note
-
-Trash is disabled even if `fs.trash.interval` is set on purpose. (HDDS-3982)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]