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

    https://github.com/apache/nifi/pull/2212#discussion_r145140092
  
    --- Diff: 
nifi-nar-bundles/nifi-hive-bundle/nifi-hive-processors/src/main/java/org/apache/nifi/processors/hive/SelectHiveQL.java
 ---
    @@ -243,95 +284,152 @@ private void onTrigger(final ProcessContext context, 
final ProcessSession sessio
                 // If the query is not set, then an incoming flow file is 
required, and expected to contain a valid SQL select query.
                 // If there is no incoming connection, onTrigger will not be 
called as the processor will fail when scheduled.
                 final StringBuilder queryContents = new StringBuilder();
    -            session.read(fileToProcess, new InputStreamCallback() {
    -                @Override
    -                public void process(InputStream in) throws IOException {
    -                    queryContents.append(IOUtils.toString(in));
    -                }
    -            });
    +            session.read(fileToProcess, in -> 
queryContents.append(IOUtils.toString(in, charset)));
                 selectQuery = queryContents.toString();
             }
     
     
    +        final Integer fetchSize = 
context.getProperty(FETCH_SIZE).evaluateAttributeExpressions().asInteger();
    --- End diff --
    
    No reason, just a copy-paste from QueryDatabaseTable which doesn't accept 
incoming connections. I will update that and any of the others. Not sure if 
it's a valid use case either, but I can't see why we shouldn't, just in case.


---

Reply via email to