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

Aldrin Piri commented on NIFI-1086:
-----------------------------------

Overall changes look good.  I think we're almost there and core functionality 
works well for the associated tickets. Licensing items seem good.

I think your client instance needs to be regenerated on every property change 
that affects it and treated as volatile.  From its docs:
{quote}
Instances of OkHttpClient are intended to be fully configured before they're 
shared - once shared they should be treated as immutable and can safely be used 
to concurrently open new connections.
{quote}

I think there is some peculiar behavior with how the handling works when there 
is an input to the processor.  If I am driving an InvokeHTTP by a 
GenerateFlowFile for instance, the processor continues to run even when there 
is no input, generating additional files that are processed through.  You will 
need to check if the processor has any incoming connections via the context and 
return in the case that there is no flowfile and there are incoming connections 
(no work to be done) vs executing without any input (should execute on trigger)

Ln 256: minor, but property description needs a 'be'

Ln 272:  minor points
  name: might prefer to have this be Always Output Response
  description for output response: "will force a response FlowFile to be 
generated regardless of status code or if the response is to be placed in "

Lns 537-540, 576-579:  Might be nice to roll all these attributes into one Map 
that you can apply to the request and response files if needed 

Lns 554-557:  Need to take care of the streams so that they are properly closed 
if any exceptions should arise

minor: HiddenLimitBoundedByteArrayOutputStream might be better suited as just 
being a LimitedBoundedBAOS, not sure the hidden makes much sense as the limit 
is accessible via getter 

> Refactor InvokeHttp
> -------------------
>
>                 Key: NIFI-1086
>                 URL: https://issues.apache.org/jira/browse/NIFI-1086
>             Project: Apache NiFi
>          Issue Type: Improvement
>            Reporter: Joseph Percivall
>            Assignee: Joseph Percivall
>             Fix For: 0.4.0
>
>         Attachments: NIFI-1086_02.patch, NIFI-1086_rebasing_to_master.patch
>
>
> InvokeHttp currently uses Java's HttpUrlConnection, which is lacking in it's 
> features and ease-of-use. In order to support all the current InvokeHttp 
> pending tickets it's clear that a new underlying library is needed.
> OkHttp looks to be a promising library that focusing on individual 
> transactions (as opposed to Apache's HttpClient that focuses more on 
> sessions). 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to