Github user JoshRosen commented on the pull request:
https://github.com/apache/spark/pull/3444#issuecomment-67220069
Ah, this was actually a pretty nasty bug since it seems to silently fail!
I'm fine merging this patch to fix this issue, but I wonder whether there
are other changes that we could make to `MetricsSystem` in order to prevent
these sorts of issues. For example, it looks like `MetricsSystem` has a bunch
of public methods like `getServletHandlers` that don't indicate when they're
safe to call (e.g. that they are only safe to call after the `MetricsSystem`
has been started). Similarly, there are a bunch of public methods like
`registerSources`, `buildRegistryName`, and `registerSinks()` that should be
private.
I'd be happy to do this cleanup here, but maybe we should just merge this
as-is then do the cleanup in a subsequent PR.
Actually, let's try this: I'll submit a PR to your PR which does the
cleanup in `MetricsSystem.scala` in order to prevent these errors from
occurring silently.
---
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.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]