Our NiFi instance has been leaking memory since started using Hive3Streaming processor and now we are seeing memory usage of 60+ GB. Looking at the processor code it seems like we are:
- Creating a new StreamingConnection with each flow file
- Registering a shutdown hook via <code>ShutdownHookManager.addShutdownHook</code> that should close the connection
- Closing the connection and not removing the shutdown hook.
The Runnable captures the connection and conf objects, and since our NiFi instance has been running continuously and the JVM hasn't shutdown (3 weeks +) the ShutdownHookManager is still holding reference to the connections created since causing the memory leak.