Details
Description
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.
Attachments
Attachments
Issue Links
- breaks
-
HDFS-14595 HDFS-11848 breaks API compatibility
- Resolved
- depends upon
-
HDFS-10480 Add an admin command to list currently open files
- Resolved
- is related to
-
HDFS-14908 LeaseManager should check parent-child relationship when filter open files.
- Resolved