Github user sudheeshkatkam commented on the pull request:
https://github.com/apache/drill/pull/495#issuecomment-217221522
Good points. I added a comment in code, but it does not completely address
your concerns.
Unfortunately, not all class (e.g. RootAllocator) can be instrumented for
metrics if the single instance is part of a contextual object. Static instance
is fine according to [library
doc](https://dropwizard.github.io/metrics/3.1.0/getting-started/#the-registry).
This means maintaining state in a static object. Is there a workaround?
AFAIK we do not provide a way to run multiple drillbits in the same JVM in
production use cases. You are right, metrics will conflict for unit tests (as
is, right now).
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---