Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-11848

Enhance dfsadmin listOpenFiles command to list files under a given path

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.0-alpha1
    • Fix Version/s: 3.1.0, 3.0.1
    • Component/s: None
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      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

        1. HDFS-11848.001.patch
          24 kB
          Yiqun Lin
        2. HDFS-11848.002.patch
          36 kB
          Yiqun Lin
        3. HDFS-11848.003.patch
          38 kB
          Yiqun Lin
        4. HDFS-11848.004.patch
          38 kB
          Yiqun Lin

          Issue Links

            Activity

              People

              • Assignee:
                linyiqun Yiqun Lin
                Reporter:
                manojg Manoj Govindassamy
              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: