Stamatis Zampetakis created HIVE-24438:
------------------------------------------

             Summary: Review shutdown hooks for memory leak
                 Key: HIVE-24438
                 URL: https://issues.apache.org/jira/browse/HIVE-24438
             Project: Hive
          Issue Type: Task
            Reporter: Stamatis Zampetakis
            Assignee: Stamatis Zampetakis


Shutdown hooks cannot be garbage collected till the JVM shutdown making the 
application prone to memory leaks. In many cases shutdown hooks are registered 
through the use of an anonymous class. If the class is created from non-static 
context then the hook implicitly holds a reference to an enclosing instance 
that is not always desirable and can lead to memory leak.

The goal of this issue is to review calls registering shutdown hooks and 
eliminate any reference to enclosing instances if that is possible. 

Check the callers of:
 * ShutdownHookManager#addShutdownHook(java.lang.Runnable)
 * ShutdownHookManager#addShutdownHook(java.lang.Runnable, int)

 



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

Reply via email to