[
https://issues.apache.org/jira/browse/NIFI-4371?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16594988#comment-16594988
]
ASF GitHub Bot commented on NIFI-4371:
--------------------------------------
Github user mattyb149 commented on a diff in the pull request:
https://github.com/apache/nifi/pull/2138#discussion_r213318454
--- Diff:
nifi-nar-bundles/nifi-hive-bundle/nifi-hive3-processors/src/main/java/org/apache/nifi/processors/hive/AbstractHive3QLProcessor.java
---
@@ -345,4 +348,22 @@ private void findTableNames(final Object obj, final
Set<TableName> tableNames) {
}
return attributes;
}
+
+ /**
+ * Method to set the configured timeout on the statement to be executed
+ * @param stmt statement to be executed
+ * @param context process context to retrieve the configured value
+ * @param flowFile flow file to evaluate expression language
+ * @throws ProcessException exception in case configured value cannot
be converted to an integer
+ */
+ protected void setTimeout(Statement stmt, ProcessContext context,
FlowFile flowFile) throws ProcessException {
--- End diff --
I mentioned it only for consistency between the two sets of processors,
actually I'd be fine with not even putting the setQueryTimeout in a try/catch
for the Hive 3 processors, now that it's supported, I don't imagine there are
any drivers that wouldn't support it at this point.
Either way you want to go is fine with me, let me know what you end up with
(even if it is what you already have :) and I'll finish the review and merge,
thanks!
> Add support for query timeout in Hive processors
> ------------------------------------------------
>
> Key: NIFI-4371
> URL: https://issues.apache.org/jira/browse/NIFI-4371
> Project: Apache NiFi
> Issue Type: Improvement
> Components: Extensions
> Reporter: Pierre Villard
> Assignee: Pierre Villard
> Priority: Major
> Attachments: Screen Shot 2017-09-09 at 4.31.21 PM.png, Screen Shot
> 2017-09-09 at 6.38.51 PM.png, Screen Shot 2017-09-09 at 6.40.48 PM.png
>
>
> With HIVE-4924 it is possible to set a query timeout when executing a query
> against Hive (starting with Hive 2.1). Right now, NiFi is built using Hive
> 1.2.1 and this feature is not available by default (the method is not
> implemented in the driver). However, if building NiFi with specific profiles
> this feature can be used.
> The objective is to expose the query timeout parameter in the processor and
> enable expression language. If the version of the driver is not implementing
> the query timeout the processor will be in invalid state (unless expression
> language is used, and in this case, the flow file will be routed to the
> failure relationship).
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)