[
https://issues.apache.org/jira/browse/HDFS-11848?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16312441#comment-16312441
]
Yiqun Lin edited comment on HDFS-11848 at 1/5/18 3:48 AM:
--
Thanks for the quick reivew, [~manojg]. Some responses for your review comments:
{quote}
DFSAdmin:935 Any benefits of using StringUtils here? The implementation is
missing trim() before the empty check.
{quote}
Had changed to trim() first then do the string length check. By this way, we
can ensure the empty path ("", or " ") will list all open files.
{quote}
DFSAdmin:2148 Would this catch the case where the -path option is not provided
with any path?
{quote}
This case will be catch in {{StringUtils.popOptionWithArgument}}. Can see
corresponding test I added in updated patch. Since the maximum number of
argument should no more than 4. So I did this change.
Other comments are all addressed.
Attach the updated patch.
was (Author: linyiqun):
Thanks for the quick reivew, [~manojg]. Some responses for your review comments:
{quote}
DFSAdmin:935 Any benefits of using StringUtils here? The implementation is
missing trim() before the empty check.
{quote}
Had changed to trim() first then do the string length check. By this way, we
can ensure the empty path ("", or " ") will list all open files.
{quote}
DFSAdmin:2148 Would this catch the case where the -path option is not provided
with any path?
{quote}
This case will be catch in {{StringUtils.popOptionWithArgument}}. Can see
corresponding test I added in updated patch. Since the maximum number should no
more than 4. So I did this change.
Other comments are all addressed.
Attach the updated patch.
> 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-11848.003.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: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org