[ 
https://issues.apache.org/jira/browse/SOLR-8097?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Gerlowski updated SOLR-8097:
----------------------------------
    Attachment: SOLR-8097.patch

Thanks for the review Anshum.  Made all the changes you suggested with
1 or 2 exceptions:

- I wanted to add more tests to ConcurrentUpdateSolrClientBuilderTest,
but for some reason ConcurrentUpdateSolrClient lacks many of the
getters that other SolrClients have.  I wrote tests for everything
that has getters, but for ConcurrentUpdateSolrClient that's not that
much.
- The change to CUSC wasn't unrelated.  The CUSC builder now calls
that ctor in such a way that the ExecutorService _could_ be null.  So
the CUSC builder now needs to be able to handle that case.  (We
actually already discussed this, just leaving this note for
completeness.)

Other than that, I've made all the changes you suggested.  All tests
pass locally.  Should be ready to go (or at least, review again).

Thanks!

> 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
>            Assignee: Anshum Gupta
>            Priority: Minor
>         Attachments: SOLR-8097.patch, SOLR-8097.patch, SOLR-8097.patch, 
> SOLR-8097.patch, SOLR-8097.patch, SOLR-8097.patch, SOLR-8097.patch, 
> SOLR-8097.patch, SOLR-8097.patch, 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