[ 
https://issues.apache.org/jira/browse/NIFI-4371?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16368236#comment-16368236
 ] 

ASF GitHub Bot commented on NIFI-4371:
--------------------------------------

Github user pvillard31 commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2138#discussion_r168924543
  
    --- Diff: 
nifi-nar-bundles/nifi-hive-bundle/nifi-hive-processors/src/main/java/org/apache/nifi/processors/hive/SelectHiveQL.java
 ---
    @@ -310,6 +311,15 @@ private void onTrigger(final ProcessContext context, 
final ProcessSession sessio
             try (final Connection con = dbcpService.getConnection();
                  final Statement st = (flowbased ? 
con.prepareStatement(selectQuery) : con.createStatement())
             ) {
    +            try {
    +                final int queryTimeout = 
context.getProperty(QUERY_TIMEOUT).evaluateAttributeExpressions(fileToProcess).asInteger();
    --- End diff --
    
    Good point. I just pushed a commit to address it.


> 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)

Reply via email to