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

Fix non-static inner classes for better memory management

    XMLWordPrintableJSON

    Details

      Description

      If an inner class does not need to reference its enclosing instance, it can be static. This prevents a common cause of memory leaks and uses less memory per instance of the enclosing class.
      Came across DataNodeProperties as a non static inner class defined in MiniDFSCluster without holding any implicit reference to MiniDFSCluster. Taking this opportunity to find other non-static inner classes that are not holding implicit reference to their respective enclosing instances.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vjasani Viraj Jasani
                Reporter:
                vjasani Viraj Jasani
              • Votes:
                0 Vote for this issue
                Watchers:
                2 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 - 2h 50m
                  2h 50m