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

Do not use exception handler to implement copy-on-write for EnumCounters

    XMLWordPrintableJSON

Details

    Description

      HDFS-14547 saves the NameNode heap space occupied by EnumCounters by essentially implementing a copy-on-write strategy.

      At beginning, all EnumCounters refers to the same ConstEnumCounters to save heap space. When it is modified, an exception is thrown and the exception handler converts ConstEnumCounters to EnumCounters object and updates it.

      Using exception handler to perform anything more than occasional is bad for performance.

      Propose: use instanceof keyword to detect the type of object and do COW accordingly.

      Attachments

        1. profile_c7_delete_asyncaudit.html
          537 kB
          Wei-Chiu Chuang
        2. Screen Shot 2021-09-22 at 1.59.59 PM.png
          468 kB
          Wei-Chiu Chuang

        Issue Links

          Activity

            People

              weichiu Wei-Chiu Chuang
              weichiu Wei-Chiu Chuang
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 10m
                  1h 10m