You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Jason Gerlowski (JIRA)" <ji...@apache.org> on 2018/08/01 01:28:00 UTC

[jira] [Commented] (SOLR-12595) CloudSolrClient.Builder should accept a zkHost connection string

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

Jason Gerlowski commented on SOLR-12595:
----------------------------------------

The CloudSolrClient.Builder constructors have drawn some ire over a few different JIRAs, as you pointed out above Vilius.  It's been a hard thing to come to a consensus on that makes everyone happy.  The principles at play ("easy-of-use", "readability", etc.) are somewhat subjective at the end of the day.

So take my comments below with a grain of salt, as they're ultimately subjective.

I'm not against adding this constructor entirely, but I do think it goes against the grain of some things that we've done recently or are planning to do in SolrJ.  Examples:
1. The initial move to Builders for creating SolrClient objects was motivated by a desire to keep the number of constructors down.
2. Other methods that have been overloaded to handle different input formats seem to have drawn attention (negatively) and look to be going away soon. (See SOLR-12502).

As I hinted above, I think the addition of this ctor is relatively innocent.  Id be happy to move it forward if no one objects.  But since there's been so many concerns/tweaks/iterations/complaints of these methods in the last few releases, I'd rather not contribute to the churn without giving a few more eyeballs a chance to take a look (or at least waiting a bit longer).

> CloudSolrClient.Builder should accept a zkHost connection string
> ----------------------------------------------------------------
>
>                 Key: SOLR-12595
>                 URL: https://issues.apache.org/jira/browse/SOLR-12595
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: SolrJ
>    Affects Versions: 7.4
>            Reporter: Vilius Pranckaitis
>            Priority: Minor
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> SOLR-11629 improved {{CloudSolrClient.Builder}} workflow by adding two new constructors:
> {code:java}
> 1.   public Builder(List<String> solrUrls) {
> 2.   public Builder(List<String> zkHosts, Optional<String> zkChroot) {
> {code}
> It is not unusual to format ZooKeeper connection details as a single string (e.g. {{zk1:2181,zk2:2181/some_chroot}}). However, these new constructors make it difficult to use such connection strings.
> It would be fairly simple to add a third constructor which would accept a connection string:
> {code:java}
> 3.   public Builder(String zkHost) {
> {code}
> {{CloudSolrClient.Builder}} uses ZooKeeper details to construct a {{ZkClientClusterStateProvider}}, which [already supports ZK connection strings|https://github.com/apache/lucene-solr/blob/d87ea6b1ccd28e0dd8e30565fe95b2e0a31f82e8/solr/solrj/src/java/org/apache/solr/client/solrj/impl/ZkClientClusterStateProvider.java#L57-L59].



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org