mmiklavc 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_r269694585
##########
File path:
metron-platform/metron-solr/src/test/java/org/apache/metron/solr/integration/SolrMetaAlertIntegrationTest.java
##########
@@ -113,12 +114,12 @@ protected String getDefaultSourceTypeField() {
}
};
-
+ SolrClient solrClient = solrDao.getSolrClient();
SolrMetaAlertSearchDao searchDao = new SolrMetaAlertSearchDao(
- solrDao.getSolrClient(solrDao.getZkHosts()),
+ solrClient,
solrDao.getSolrSearchDao(), config);
- SolrMetaAlertRetrieveLatestDao retrieveLatestDao = new
SolrMetaAlertRetrieveLatestDao(solrDao);
- SolrMetaAlertUpdateDao updateDao = new SolrMetaAlertUpdateDao(solrDao,
searchDao,
+ SolrMetaAlertRetrieveLatestDao retrieveLatestDao = new
SolrMetaAlertRetrieveLatestDao(solrClient, solrDao);
Review comment:
Yeah, I think this is much clearer. Then we don't have to dig through a
morass of code just to figure out who is creating what client objects and who
is secretly depending on them under the hood.
----------------------------------------------------------------
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