Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-4461

DirectoryScanner: volume path prefix takes up memory for every block that is scanned

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.3-alpha
    • Fix Version/s: 2.1.0-beta, 0.23.11
    • Component/s: None
    • Labels:
      None

      Description

      In the DirectoryScanner, we create a class ScanInfo for every block. This object contains two File objects-- one for the metadata file, and one for the block file. Since those File objects contain full paths, users who pick a lengthly path for their volume roots will end up using an extra N_blocks * path_prefix bytes per block scanned. We also don't really need to store File objects-- storing strings and then creating File objects as needed would be cheaper. This would be a nice efficiency improvement.

      1. HDFS-4461.002.patch
        4 kB
        Colin Patrick McCabe
      2. HDFS-4461.003.patch
        4 kB
        Colin Patrick McCabe
      3. HDFS-4461.004.patch
        6 kB
        Colin Patrick McCabe
      4. HDFS-4461.branch-0.23.patch
        11 kB
        Kihwal Lee
      5. HDFS-4661.006.patch
        10 kB
        Colin Patrick McCabe
      6. memory-analysis.png
        140 kB
        Colin Patrick McCabe

        Issue Links

          Activity

          Colin Patrick McCabe created issue -
          Colin Patrick McCabe made changes -
          Field Original Value New Value
          Attachment 002.patch [ 12567469 ]
          Colin Patrick McCabe made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Colin Patrick McCabe made changes -
          Attachment memory-analysis.png [ 12567472 ]
          Colin Patrick McCabe made changes -
          Attachment HDFS-4461.002.patch [ 12567474 ]
          Colin Patrick McCabe made changes -
          Attachment 002.patch [ 12567469 ]
          Colin Patrick McCabe made changes -
          Attachment HDFS-4461.003.patch [ 12567501 ]
          Colin Patrick McCabe made changes -
          Description In the {{DirectoryScanner}}, we create a class {{ScanInfo}} for every block. This object contains two File objects-- one for the metadata file, and one for the block file. Since those File objects contain full paths, users who pick a lengthly path for their volume roots will end up using an extra N_blocks * path_prefix bytes per block scanned. We also don't really need to store File objects-- storing strings and then creating File objects as needed would be cheaper. This has been causing out-of-memory conditions for users who pick such long volume paths. In the {{DirectoryScanner}}, we create a class {{ScanInfo}} for every block. This object contains two File objects-- one for the metadata file, and one for the block file. Since those File objects contain full paths, users who pick a lengthly path for their volume roots will end up using an extra N_blocks * path_prefix bytes per block scanned. We also don't really need to store File objects-- storing strings and then creating File objects as needed would be cheaper. This would be a nice efficiency improvement.
          Suresh Srinivas made changes -
          Link This issue relates to HDFS-4465 [ HDFS-4465 ]
          Colin Patrick McCabe made changes -
          Attachment HDFS-4461.004.patch [ 12570534 ]
          Colin Patrick McCabe made changes -
          Attachment HDFS-4661.006.patch [ 12588456 ]
          Colin Patrick McCabe made changes -
          Status Patch Available [ 10002 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Colin Patrick McCabe made changes -
          Fix Version/s 2.1.0-beta [ 12324031 ]
          Arun C Murthy made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Kihwal Lee made changes -
          Attachment HDFS-4461.branch-0.23.patch [ 12633977 ]
          Kihwal Lee made changes -
          Fix Version/s 0.23.11 [ 12324661 ]

            People

            • Assignee:
              Colin Patrick McCabe
              Reporter:
              Colin Patrick McCabe
            • Votes:
              0 Vote for this issue
              Watchers:
              15 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development