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_r269692863
##########
File path:
metron-platform/metron-solr/src/main/java/org/apache/metron/solr/dao/SolrMetaAlertRetrieveLatestDao.java
##########
@@ -36,8 +37,10 @@
MetaAlertRetrieveLatestDao {
private SolrDao solrDao;
+ private SolrClient solrClient;
- public SolrMetaAlertRetrieveLatestDao(SolrDao solrDao) {
+ public SolrMetaAlertRetrieveLatestDao(SolrClient client, SolrDao solrDao) {
Review comment:
I like this approach of constructor dep injection for all DAOs. Independent
of a larger refactoring effort, I think we should standardize on at least
passing in a solrclient via constructor for all DAOs. We really shouldn't be
passing around connection/client objects like stolen candy between them. If
we're decorating/composing objects, then let's wire this up via constructors.
----------------------------------------------------------------
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