[
https://issues.apache.org/jira/browse/NIFI-1086?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15005617#comment-15005617
]
Aldrin Piri commented on NIFI-1086:
-----------------------------------
In creating NIFI-1168, I was wondering what your thoughts were on creating a
Request flowfile regardless of whether or not the response is to be put into an
attribute.
My thought behind this would be that if I schedule an InvokeHTTP to GET some
resource over a certain period and maybe use EL to provide that time
specification, it would be beneficial to route that potentially unique request
to a retry/failure loop that allows me to triage and handle on a per request
basis.
Poking through the code again while evaluating the above I saw a couple of
other things.
Noticed OkClient's Response class has an associated isSuccessful, you may wish
to use that.
Also, I think it would be preferred to avoid the exception when statusCode == 0
(Ln 531). This is just going to kick a problematic file back to its input
queue to retry again. Instead, we would likely prefer to route the troublesome
file to failure and make an associated log message. For status code 0, does it
actually mean a connection wasn't attempted? Looked through docs, but nothing
immediately jumped out at me. Might also be nice to include the status message
if there is one in the associated error message on failure.
> 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)