How to include TaskCountStatsMonitor module in 0.14.0-incubating

druid version: 0.14.0-incubating

druid monitor configuration:

druid.monitoring.emissionPeriod=PT1M

druid.monitoring.monitors=[“org.apache.druid.java.util.metrics.JvmMonitor”, “org.apache.druid.java.util.metrics.SysMonitor”,“org.apache.druid.server.metrics.TaskCountStatsMonitor”]

while, I try to include TaskCountStatsMonitor module in druid runtime properties, got this error:

2019-09-01T14:04:55,833 INFO [main] org.apache.druid.server.metrics.MetricsModule - Adding monitor[org.apache.druid.java.util.metrics.SysMonitor@2bc7db89]

Exception in thread “main” com.google.inject.CreationException: Unable to create injector, see the following errors:

  1. No implementation for org.apache.druid.server.metrics.TaskCountStatsProvider was bound.

while locating org.apache.druid.server.metrics.TaskCountStatsProvider

for the 1st parameter of org.apache.druid.server.metrics.TaskCountStatsMonitor.(TaskCountStatsMonitor.java:37)

while locating org.apache.druid.server.metrics.TaskCountStatsMonitor

at org.apache.druid.server.metrics.MetricsModule.getMonitorScheduler(MetricsModule.java:92) (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:92) (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:77) (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 com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:470)

at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:184)

at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:110)

at com.google.inject.Guice.createInjector(Guice.java:99)

at com.google.inject.Guice.createInjector(Guice.java:73)

at com.google.inject.Guice.createInjector(Guice.java:62)

at org.apache.druid.initialization.Initialization.makeInjectorWithModules(Initialization.java:422)

at org.apache.druid.cli.GuiceRunnable.makeInjector(GuiceRunnable.java:69)

at org.apache.druid.cli.ServerRunnable.run(ServerRunnable.java:57)

at org.apache.druid.cli.Main.main(Main.java:118)

Hi,

All monitors can not be added in common runtime properties as they can be specific to certain nodes and will give this kind of error on other nodes.

For taskcountstatsmonitor, you should add it on overlord runtime properties to get it work.

thanks, it works when I add it on overlord runtime properties.

在 2019年9月1日星期日 UTC+8下午7:59:49,Guillaume Lhermenier写道: