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

Siyao Meng commented on HDFS-15513:
-----------------------------------

Hi [~jianghuazhu], thanks for the comment.

The goal here is to reduce the overhead of getting the entire snapshot listing, 
so we can query the snapshottable status of only the list of directories the 
client is interested in.

{{DFSClient#getSnapshotListing}} eventually calls into 
{{FSNamesystem#getSnapshottableDirListing}}, the latter of which I mentioned in 
the description. It always returns the full listing. The overhead grows when 
there are more snapshottable directories.

> Allow client to query snapshot status on one directory
> ------------------------------------------------------
>
>                 Key: HDFS-15513
>                 URL: https://issues.apache.org/jira/browse/HDFS-15513
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: hdfs, hdfs-client
>    Affects Versions: 3.3.0
>            Reporter: Siyao Meng
>            Priority: Major
>
> Alternatively, we can allow the client to query snapshot status on *a list 
> of* given directories by the client. Thoughts?
> Rationale:
> At the moment, we could only retrieve the full list of snapshottable 
> directories with 
> [{{getSnapshottableDirListing()}}|https://github.com/apache/hadoop/blob/233619a0a462ae2eb7e7253b6bb8ae48eaa5eb19/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java#L6986-L6994].
>  This leads to the inefficiency In HDFS-15492 that we have to get the 
> *entire* list of snapshottable directory to check if a file being deleted is 
> inside a snapshottable directory.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to