Viraj Jasani created HDFS-15931:
-----------------------------------

             Summary: Fix non-static inner classes for better memory management
                 Key: HDFS-15931
                 URL: https://issues.apache.org/jira/browse/HDFS-15931
             Project: Hadoop HDFS
          Issue Type: Improvement
            Reporter: Viraj Jasani
            Assignee: Viraj Jasani


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.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-dev-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-h...@hadoop.apache.org

Reply via email to