[
https://issues.apache.org/jira/browse/HDFS-11848?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16312361#comment-16312361
]
Manoj Govindassamy commented on HDFS-11848:
-------------------------------------------
Thanks for the patch contribution [~linyiqun]. Overall looks good to me. Here
are few minor comments:
1. {{DFSAdmin:467}} To be consistent with the rest of the options, the
indentation change can be restored to the old one.
2. {{DFSAdmin:935}} Any benefits of using StringUtils here? The implementation
is missing trim() before the empty check.
3. {{DFSAdmin:2148}} Would this catch the case where the -path option is not
provided with any path?
4. {{HDFSCommands.md:412}} (1) -path option missing. (2) "Open files list can
filtered by given type or path. " should this be "Open files list will be
filtered by given type and path. "
5. {{TestDFSAdmin:761}} Please add a test case to verify -path without any path
arguments, and with an empty path ""
6. Nit: On few places the default value for the path is given as null and all
other places it is given as OpenFilesIterator.FILTER_PATH_DEFAULT. Better if we
can be consistent with the default value usage for simplicity.
> Enhance dfsadmin listOpenFiles command to list files under a given path
> -----------------------------------------------------------------------
>
> Key: HDFS-11848
> URL: https://issues.apache.org/jira/browse/HDFS-11848
> Project: Hadoop HDFS
> Issue Type: Improvement
> Affects Versions: 3.0.0-alpha1
> Reporter: Manoj Govindassamy
> Assignee: Yiqun Lin
> Attachments: HDFS-11848.001.patch, HDFS-11848.002.patch
>
>
> HDFS-10480 adds {{listOpenFiles}} option is to {{dfsadmin}} command to list
> all the open files in the system.
> One more thing that would be nice here is to filter the output on a passed
> path or DataNode. Usecases: An admin might already know a stale file by path
> (perhaps from fsck's -openforwrite), and wants to figure out who the lease
> holder is. Proposal here is add suboptions to {{listOpenFiles}} to list files
> filtered by path.
> {{LeaseManager#getINodeWithLeases(INodeDirectory)}} can be used to get the
> open file list for any given ancestor directory.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]