[
https://issues.apache.org/jira/browse/NIFI-3026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15676761#comment-15676761
]
ASF GitHub Bot commented on NIFI-3026:
--------------------------------------
Github user markap14 commented on the issue:
https://github.com/apache/nifi/pull/1208
@ijokarumawak it was not the comment that concerns me. What concerns me is
that we have a method named getUrl() (present in both SiteToSiteClientConfig
and the SiteToSiteClient.Builder), and that method returns a String that is no
longer a valid URL. Given that the method name is getUrl(), it is very
reasonable to expect someone to write code like the following:
`final URL url = new URL(clientConfig.getUrl());`
And in fact we did something very similar in the client. This will now
throw an Exception because getUrl() may not be returning a valid URL. There are
many reasons that may be done - not just by someone implementing a client.
Also, we can't assume that "the URL is what they configured by themselves."
Certainly, code can be written to pass this object around. There's no telling
where it came from.
We also must keep in mind that while Apache Flink, Storm and Spark
integration may be safe, we have no idea what other projects may be using the
client.
So my recommendation would be this: have a method named getUrls() that
returns a comma-separated list of URL's, just like getUrl() does now in this
PR. Then, add a getUrl() to maintain backward compatibility but make that
method return the first URL available and mark it as deprecated with
documentation as to why it's deprecated and why we now recommend use of
getUrls() instead.
Does that seem reasonable?
> S2S initial connection behavior enhancement
> -------------------------------------------
>
> Key: NIFI-3026
> URL: https://issues.apache.org/jira/browse/NIFI-3026
> Project: Apache NiFi
> Issue Type: Improvement
> Components: Core Framework, Core UI
> Reporter: Koji Kawamura
> Assignee: Koji Kawamura
>
> s2s client behavior and initial connection improvement is needed.
> Current experience is this: I, as a client (e.g. minifi), connect to a nifi
> cluster of e.g. 10 nodes. but i need to specify 1 node URL to establish this
> connection. this node may not be available 100% and go down, in which case my
> initial connection won't work.
> Once S2S makes the first connection, it then has a list of all nodes, and can
> check their status. But first connection failure would be a concern if the
> specified URL is somehow not working. Usually for these problems, the client
> should be able to specify multiple urls (according to multiple target cluster
> nodes), comma-separated.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)