NIFI-5841 Fix memory leak of PutHive3Streaming.
authorkei miyauchi <kei_miyauchi@qualica.co.jp>
Tue, 8 Jan 2019 00:38:46 +0000 (09:38 +0900)
committerKoji Kawamura <ijokarumawak@apache.org>
Wed, 9 Jan 2019 03:06:27 +0000 (12:06 +0900)
This closes #3249.

Signed-off-by: Koji Kawamura <ijokarumawak@apache.org>
nifi-nar-bundles/nifi-hive-bundle/nifi-hive3-processors/src/main/java/org/apache/nifi/processors/hive/PutHive3Streaming.java

index 810471b..81916c6 100644 (file)
@@ -412,9 +412,6 @@ public class PutHive3Streaming extends AbstractProcessor {
                 }
 
                 hiveStreamingConnection = makeStreamingConnection(options, reader);
-                // Add shutdown handler with higher priority than FileSystem shutdown hook so that streaming connection gets closed first before
-                // filesystem close (to avoid ClosedChannelException)
-                ShutdownHookManager.addShutdownHook(hiveStreamingConnection::close, FileSystem.SHUTDOWN_HOOK_PRIORITY + 1);
 
                 // Write records to Hive streaming, then commit and close
                 hiveStreamingConnection.beginTransaction();