ZOOKEEPER-4324: dropwizard-metrics should be optional - #2402
Conversation
maoling
left a comment
There was a problem hiding this comment.
This PR fixes an issue where external projects (e.g. Solr) could still encounter ClassNotFoundException or build failures even after excluding Dropwizard and configuring metricsProvider.className=org.apache.zookeeper.metrics.impl.NullMetricsProvider.
I tested this change with PrometheusMetricsProvider, DefaultMetricsProvider, and NullMetricsProvider, and all three configurations work as expected.
|
@PDavid could you please consider merging this? |
1970197 to
dc177b2
Compare
|
@anmolnar maybe this PR is of interest to you as well. I brought it up to date. Pom.xml already has "archunit". This PR adds an archunit test to ensure the dropwizard dependency is isolated. |
PDavid
left a comment
There was a problem hiding this comment.
Thanks, this looks good to me. Also thanks for adding the ArchUnit test. 👍
|
Merged to master and I backported it to |
|
Acted to fast. |
|
It would have been simple, I think, to simply add the dependency to pom.xml accordingly? |
Or we just keep the two patches (Netty + dropwizard) in the master branch only and release with 3.10.0 soon. |
|
Nothing I said should be taken as impacting the 3.10 release. It's a question of a future 9.x release benefiting. Your call. |
I leave it up for the community. Anybody wants to see them in 3.9.x, open PR and I'll be happy to review. |
See https://issues.apache.org/jira/browse/ZOOKEEPER-4324
I verified this change in Solr -- I was able to start Solr in SolrCloud mode with the following setting in its
zoo.cfg:metricsProvider.className=org.apache.zookeeper.metrics.impl.NullMetricsProviderIdeally I'd add an "ArchUnit" test as well, as I did in #2374