[
https://issues.apache.org/jira/browse/NIFI-4963?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16507720#comment-16507720
]
ASF GitHub Bot commented on NIFI-4963:
--------------------------------------
Github user prasanthj commented on a diff in the pull request:
https://github.com/apache/nifi/pull/2755#discussion_r194301151
--- Diff:
nifi-nar-bundles/nifi-hive-bundle/nifi-hive3-processors/src/main/java/org/apache/nifi/processors/hive/PutHive3Streaming.java
---
@@ -397,6 +398,9 @@ public void onTrigger(ProcessContext context,
ProcessSession session) throws Pro
}
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);
--- End diff --
You may also want to add uncaught exception handler as I have seen
instances where runtime exception or illegal state exception thrown by some
other code which if not caught can create broken files.
> Add support for Hive 3.0 processors
> -----------------------------------
>
> Key: NIFI-4963
> URL: https://issues.apache.org/jira/browse/NIFI-4963
> Project: Apache NiFi
> Issue Type: New Feature
> Components: Extensions
> Reporter: Matt Burgess
> Assignee: Matt Burgess
> Priority: Major
>
> Apache Hive is working on Hive 3.0, this Jira is to add a bundle of
> components (much like the current Hive bundle) that supports Hive 3.0 (and
> Apache ORC if necessary).
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)