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

Joseph Percivall commented on NIFI-1086:
----------------------------------------

That's true for the OkHttpClient but I'm thinking an atomic reference instead 
of just marking it volatile may be better. In the OnScheduled first set the 
reference to a value of null (.set) then I create an OkHttpClient + configure 
it with all the necessary properties. Finally set the 
okHttpClientAtomicReference to the new OkHttpClient at the end of the 
onScheduled method. I think it better conveys that a new OkHttpClient is 
getting generated and configured only in the OnScheduled method

For having incoming connections: ah I didn't realize that processors with 
connections would get scheduled when there are no flowfiles available. I'll 
just add a check for that.

ln 256: good catch - adding

ln 272: Changed to Always Output Response with a description along those lines 
but with more detail

lns 537-540, 57-579: You're right, I saw that and was trying to think of a 
better way to do it than doing the say four lines twice but a helper method 
didn't make as much sense. - fixing

lns 554-557: Right - fixing

You're right that it isn't hidden but what I meant by that is that it won't 
throw an exception if something tries to write more than the limit, I think 
"SoftLimitBoundedBAOS" is more appropriate. I also added a comment in the class.

> 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