You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2020/06/29 06:33:43 UTC
[GitHub] [druid] suneet-s opened a new pull request #10092: QueryCountStatsMonitor can be injected in the Peon
suneet-s opened a new pull request #10092:
URL: https://github.com/apache/druid/pull/10092
### Description
This change fixes a dependency injection bug where there is a circular
dependency on getting the MonitorScheduler when a user configures the
QueryCountStatsMonitor to be used.
Before this change, submitting an ingestion job with the QueryCountStatsMonitor
configured on the middle manager would throw a circular dependency error in guice.
```
Exception in thread "main" java.lang.RuntimeException: java.lang.RuntimeException: com.google.inject.CreationException: Unable to create injector, see the following errors:
1) Tried proxying org.apache.druid.java.util.metrics.MonitorScheduler to support a circular dependency, but it is not an interface.
at org.apache.druid.server.metrics.MetricsModule.getMonitorScheduler(MetricsModule.java:93) (via modules: com.google.inject.util.Modules$OverrideModule -> com.google.inject.util.Modules$OverrideModule -> org.apache.druid.server.metrics.MetricsModule)
while locating org.apache.druid.java.util.metrics.MonitorScheduler
for the 14th parameter of org.apache.druid.indexing.common.TaskToolboxFactory.<init>(TaskToolboxFactory.java:120)
at org.apache.druid.cli.CliPeon.bindTaskConfigAndClients(CliPeon.java:400) (via modules: com.google.inject.util.Modules$OverrideModule -> com.google.inject.util.Modules$OverrideModule -> org.apache.druid.cli.CliPeon$1)
while locating org.apache.druid.indexing.common.TaskToolboxFactory
for the 1st parameter of org.apache.druid.indexing.overlord.SingleTaskBackgroundRunner.<init>(SingleTaskBackgroundRunner.java:95)
at org.apache.druid.cli.CliPeon$1.configure(CliPeon.java:210) (via modules: com.google.inject.util.Modules$OverrideModule -> com.google.inject.util.Modules$OverrideModule -> org.apache.druid.cli.CliPeon$1)
while locating org.apache.druid.indexing.overlord.SingleTaskBackgroundRunner
while locating org.apache.druid.query.QuerySegmentWalker
for the 2nd parameter of org.apache.druid.server.QueryLifecycleFactory.<init>(QueryLifecycleFactory.java:52)
at org.apache.druid.server.QueryLifecycleFactory.class(QueryLifecycleFactory.java:52)
while locating org.apache.druid.server.QueryLifecycleFactory
for the 1st parameter of org.apache.druid.server.QueryResource.<init>(QueryResource.java:121)
at org.apache.druid.server.QueryResource.class(QueryResource.java:79)
while locating org.apache.druid.server.QueryResource
while locating org.apache.druid.server.metrics.QueryCountStatsProvider
for the 1st parameter of org.apache.druid.server.metrics.QueryCountStatsMonitor.<init>(QueryCountStatsMonitor.java:40)
while locating org.apache.druid.server.metrics.QueryCountStatsMonitor
at org.apache.druid.server.metrics.MetricsModule.getMonitorScheduler(MetricsModule.java:93) (via modules: com.google.inject.util.Modules$OverrideModule -> com.google.inject.util.Modules$OverrideModule -> org.apache.druid.server.metrics.MetricsModule)
at org.apache.druid.server.metrics.MetricsModule.getMonitorScheduler(MetricsModule.java:93) (via modules: com.google.inject.util.Modules$OverrideModule -> com.google.inject.util.Modules$OverrideModule -> org.apache.druid.server.metrics.MetricsModule)
while locating org.apache.druid.java.util.metrics.MonitorScheduler
at org.apache.druid.server.metrics.MetricsModule.configure(MetricsModule.java:78) (via modules: com.google.inject.util.Modules$OverrideModule -> com.google.inject.util.Modules$OverrideModule -> org.apache.druid.server.metrics.MetricsModule)
while locating org.apache.druid.java.util.metrics.MonitorScheduler annotated with @com.google.inject.name.Named(value=ForTheEagerness)
1 error
at org.apache.druid.cli.CliPeon.run(CliPeon.java:315)
at org.apache.druid.cli.Main.main(Main.java:113)
```
<hr>
This PR has:
- [ ] been self-reviewed.
- [ ] using the [concurrency checklist](https://github.com/apache/druid/blob/master/dev/code-review/concurrency.md) (Remove this item if the PR doesn't have any relation to concurrency.)
- [ ] added documentation for new or modified features or behaviors.
- [ ] added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
- [ ] added or updated version, license, or notice information in [licenses.yaml](https://github.com/apache/druid/blob/master/licenses.yaml)
- [ ] added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
- [ ] added unit tests or modified existing tests to cover new code paths, ensuring the threshold for [code coverage](https://github.com/apache/druid/blob/master/dev/code-review/code-coverage.md) is met.
- [ ] added integration tests.
- [ ] been tested in a test Druid cluster.
<hr>
##### Key changed/added classes in this PR
* `TaskToolboxFactory`
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] clintropolis merged pull request #10092: QueryCountStatsMonitor can be injected in the Peon
Posted by GitBox <gi...@apache.org>.
clintropolis merged pull request #10092:
URL: https://github.com/apache/druid/pull/10092
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org