Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.23.0
    • Component/s: datanode
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      Inner class FSDir constructor is doing duplicate iterations over the listed files in the passed directory. We can optimize this to single loop and also we can avoid isDirectory check which will perform some native invocations.

      Consider a case: one directory has only one child directory and 10000 files.

      1) First loop will get the number of children directories.

      2) if (numChildren > 0) , This condition will satisfy and again it will iterate 10001 times and also will check isDirectory.

      1. HDFS-1774-1.patch
        1 kB
        Uma Maheswara Rao G
      2. HDFS-1774-1.patch
        1 kB
        Uma Maheswara Rao G
      3. HDFS-1774.patch
        5 kB
        Uma Maheswara Rao G

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Uma Maheswara Rao G
            Reporter:
            Uma Maheswara Rao G
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development