merrimanr commented on a change in pull request #1367: METRON-2022: Metron rest
creates large number of connections to ZK which causes subsequent connection to
zk fail
URL: https://github.com/apache/metron/pull/1367#discussion_r271769102
##########
File path:
metron-platform/metron-solr/src/main/java/org/apache/metron/solr/dao/SolrMetaAlertDao.java
##########
@@ -144,10 +144,11 @@ protected String getDefaultSourceTypeField() {
}
};
- SolrClient solrClient = solrDao.getSolrClient(solrDao.getZkHosts());
+ SolrClient solrClient = solrDao.getSolrClient();
Review comment:
The latest commit removes the `getSolrClient` method from the `SolrDao`
class. The SolrClient instance is now managed by the `SolrClientFactory`
class. I had to also add a `close` method to close the connection and release
the reference so that a new SolrClient can be instantiated as needed. This was
necessary for integration tests because multiple in memory Solr servers are
spun up in the same JVM and a new client is needed for each.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services