[
https://issues.apache.org/jira/browse/HDFS-15614?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17320719#comment-17320719
]
Shashikant Banerjee commented on HDFS-15614:
--------------------------------------------
[~ayushtkn], i just tried making a snapshottable directory and it seems the
.Trash is implicitly created once the config
"dfs.namenode.snapshot.trashroot.enabled" is set to true.
{code:java}
hdfs dfsadmin -fs hdfs://127.0.0.1:9999 -allowsnapshot /
hdfs dfs -ls hdfs://127.0.0.1:9999/
Found 2 items
drwxrwxrwt - shashikant supergroup 0 2021-04-12 11:20
hdfs://127.0.0.1:9999/.Trash
drwxr-xr-x - shashikant supergroup 0 2021-04-12 11:19
hdfs://127.0.0.1:9999/dir1{code}
[~smeng], can you please confirm?
> Initialize snapshot trash root during NameNode startup if enabled
> -----------------------------------------------------------------
>
> Key: HDFS-15614
> URL: https://issues.apache.org/jira/browse/HDFS-15614
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Reporter: Siyao Meng
> Assignee: Siyao Meng
> Priority: Major
> Labels: pull-request-available
> Fix For: 3.4.0
>
> Time Spent: 3h 10m
> Remaining Estimate: 0h
>
> This is a follow-up to HDFS-15607.
> Goal:
> Initialize (create) snapshot trash root for all existing snapshottable
> directories if {{dfs.namenode.snapshot.trashroot.enabled}} is set to
> {{true}}. So admins won't have to run {{dfsadmin -provisionTrash}} manually
> on all those existing snapshottable directories.
> The change is expected to land in {{FSNamesystem}}.
> Discussion:
> 1. Currently in HDFS-15607, the snapshot trash root creation logic is on the
> client side. But in order for NN to create it at startup, the logic must
> (also) be implemented on the server side as well. -- which is also a
> requirement by WebHDFS (HDFS-15612).
> 2. Alternatively, we can provide an extra parameter to the
> {{-provisionTrash}} command like: {{dfsadmin -provisionTrash -all}} to
> initialize/provision trash root on all existing snapshottable dirs.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]