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

Anshum Gupta commented on SOLR-8097:
------------------------------------

Thanks Jason. This looks good to me, how ever I'm debating about using an 
interface instead of an abstract class as that would do away with the 
single-inheritance restriction. I don't feel too strongly about it so I'm fine 
with either.

Here are a few minor things I spotted so far:

* updateLeadersOnly - let's just keep that as updatesToLeaders for consistency. 
It would make things easier for users and future developers. If you want to 
change it, it's best to change it throughout the file.
* Unused imports cleanup
* Javadocs wouldn't render correctly as the @return tag swallows the return 
char.

A couple of changes in the patch seem unrelated. Let's move them into their own 
issue:
* CUSC change seems unrelated.
* BinaryResponseParser being used as default in the HttpSolrClient constructor 
and LBHttpSolrClient.

Let's carry on with adding tests, javadocs, deprecation, and also using this in 
existing tests. We might not want to change all the tests but optionally pick 
between builder and existing way of constructing the clients for now in the 
tests though.

> Implement a builder pattern for constructing a Solrj client
> -----------------------------------------------------------
>
>                 Key: SOLR-8097
>                 URL: https://issues.apache.org/jira/browse/SOLR-8097
>             Project: Solr
>          Issue Type: Improvement
>          Components: SolrJ
>    Affects Versions: master
>            Reporter: Hrishikesh Gadre
>            Priority: Minor
>         Attachments: SOLR-8097.patch, SOLR-8097.patch
>
>
> Currently Solrj clients (e.g. CloudSolrClient) supports multiple constructors 
> as follows,
> public CloudSolrClient(String zkHost) 
> public CloudSolrClient(String zkHost, HttpClient httpClient) 
> public CloudSolrClient(Collection<String> zkHosts, String chroot)
> public CloudSolrClient(Collection<String> zkHosts, String chroot, HttpClient 
> httpClient)
> public CloudSolrClient(String zkHost, boolean updatesToLeaders)
> public CloudSolrClient(String zkHost, boolean updatesToLeaders, HttpClient 
> httpClient)
> It is kind of problematic while introducing an additional parameters (since 
> we need to introduce additional constructors). Instead it will be helpful to 
> provide SolrClient Builder which can provide either default values or support 
> overriding specific parameter. 



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

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

Reply via email to