[ https://issues.apache.org/jira/browse/HDFS-8959?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14713415#comment-14713415 ]
Rakesh R commented on HDFS-8959: -------------------------------- I'm attaching patch. Here I've exposed {{DistributedFileSystem#listSnapshottableDirs()}} iterator-based API and at the server side to support navigation used {{TreeMap snapshottables}} data structure instead of {{HashMap snapshottables}}. Please review the proposal, Thanks! > Provide an iterator-based API for listing all the snapshottable directories > --------------------------------------------------------------------------- > > Key: HDFS-8959 > URL: https://issues.apache.org/jira/browse/HDFS-8959 > Project: Hadoop HDFS > Issue Type: Improvement > Reporter: Rakesh R > Assignee: Rakesh R > Attachments: HDFS-8959-00.patch > > > Presently {{DistributedFileSystem#getSnapshottableDirListing()}} is sending > all the {{SnapshottableDirectoryStatus[]}} array to the clients. Now the > client should have enough space to hold it in memory. There could be chance > that the client JVMs running out of memory because of this. Also, some time > back there was a > [comment|https://issues.apache.org/jira/browse/HDFS-8643?focusedCommentId=14658800&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14658800] > about RPC packet limitation and a large number of snapshot list can again > cause issues. > I believe iterator based {{DistributedFileSystem#listSnapshottableDirs()}} > API would be a good addition! -- This message was sent by Atlassian JIRA (v6.3.4#6332)