Github user justinleet commented on the issue:
https://github.com/apache/metron/pull/970
@nickwallen I did a super POC refactoring I think is closer to what you're
looking for. It only restructures the code more the way you're talking about
(for Solr only, didn't have time to push everything to ES also), and doesn't
resolve the code reuse problem. Check out
https://github.com/justinleet/metron/tree/METRON-1421-interface-refactor
Right now the way that's set up is that it pushes the implementations down
to a class level and composes them directly, which is a push closer to the way
the base SolrDao does things.
It does not get rid of IndexDao. I think that's valuable to keep as a
unified, single-entry point interface. The main implementations (SolrDao and
SolrMetaAlertDao) defer primarily to the interface. I'm inclined to not break
that for this PR (the current master does this exact thing, but duplicates the
methods in IndexDao and the related DAOs, which I think is worse than just
having IndexDao extend explicitly). We could have those vary independently,
but I'm inclined to consider that outside the scope of this PR. MetaAlertDao
is similarly structured by extending the MetaAlert* interfaces + IndexDao,
ensuring that SolrMetaAlertDao meets all the requirements for the DAOs.
To make that branch viable, in my mind we need a couple things
1. Mirror the changes in the ES side
2. Solve the code reuse problem for Solr and ES.
3. Clean up tests for both
4. Probably other cleanup I'm not thinking of right now.
---