Do we support `druid.emitter` for `composing` type...
# dev
k
Do we support
druid.emitter
for
composing
type for
parametrized
with
dropwizard
together.?
By uing this combination , hitting the below error -
Dropwizard emitter Service not started.
Copy code
java.util.concurrent.RejectedExecutionException: Dropwizard emitter Service not started.
        at org.apache.druid.emitter.dropwizard.DropwizardEmitter.emit(DropwizardEmitter.java:96) ~[?:?]
        at org.apache.druid.java.util.emitter.core.ComposingEmitter.emit(ComposingEmitter.java:57) ~[druid-processing-27.0.0.3.2.2.0-1.jar:27.0.0.3.2.2.0-1]
        at org.apache.druid.java.util.emitter.service.ServiceEmitter.emit(ServiceEmitter.java:67) ~[druid-processing-27.0.0.3.2.2.0-1.jar:27.0.0.3.2.2.0-1]
        at org.apache.druid.java.util.emitter.service.ServiceEmitter.emit(ServiceEmitter.java:72) ~[druid-processing-27.0.0.3.2.2.0-1.jar:27.0.0.3.2.2.0-1]
        at org.apache.druid.java.util.metrics.JvmMonitor.emitJvmMemMetrics(JvmMonitor.java:110) ~[druid-processing-27.0.0.3.2.2.0-1.jar:27.0.0.3.2.2.0-1]
        at org.apache.druid.java.util.metrics.JvmMonitor.doMonitor(JvmMonitor.java:74) ~[druid-processing-27.0.0.3.2.2.0-1.jar:27.0.0.3.2.2.0-1]
        at org.apache.druid.java.util.metrics.AbstractMonitor.monitor(AbstractMonitor.java:54) ~[druid-processing-27.0.0.3.2.2.0-1.jar:27.0.0.3.2.2.0-1]
        at org.apache.druid.java.util.metrics.MonitorScheduler.removeMonitor(MonitorScheduler.java:95) ~[druid-processing-27.0.0.3.2.2.0-1.jar:27.0.0.3.2.2.0-1]
        at org.apache.druid.java.util.metrics.MonitorScheduler.stop(MonitorScheduler.java:126) ~[druid-processing-27.0.0.3.2.2.0-1.jar:27.0.0.3.2.2.0-1]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_412]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_412]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_412]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_412]
        at org.apache.druid.java.util.common.lifecycle.Lifecycle$AnnotationBasedHandler.stop(Lifecycle.java:465) ~[druid-processing-27.0.0.3.2.2.0-1.jar:27.0.0.3.2.2.0-1]
        at org.apache.druid.java.util.common.lifecycle.Lifecycle.stop(Lifecycle.java:368) ~[druid-processing-27.0.0.3.2.2.0-1.jar:27.0.0.3.2.2.0-1]
        at org.apache.druid.java.util.common.lifecycle.Lifecycle$1.run(Lifecycle.java:401) ~[druid-processing-27.0.0.3.2.2.0-1.jar:27.0.0.3.2.2.0-1]
        at java.lang.Thread.run(Thread.java:750) ~[?:1.8.0_412]
a
Yes,
composing
emitter should work with any type of Druid emitter. Do you have the configuration & extensions setup correctly? Are you able to use the
dropwizard
emitter without the
composing
emitter?
k
Able to use the
dropwizard
and
parametrized
independently, but not with composing together, hitting above the above error.
Composing emitter configuration
Copy code
druid.emitter =  composing  

 druid.extensions.loadList = [..,"dropwizard-emitter"]

druid.emitter=composing
druid.emitter.composing.emitters=["dropwizard","parametrized"]
druid.emitter.dropwizard.dimensionMapPath=/etc/druid/conf/MetricDimension.json
druid.emitter.dropwizard.includeHost=false
druid.emitter.dropwizard.reporters=[{"type":"jmx"}]
druid.emitter.parametrized.httpEmitting.basicAuthentication=admin:263f9f516f7f5099194b926edbdff4ff
druid.emitter.parametrized.recipientBaseUrlPattern=<http://ce03.hostname.com:9888>
druid.request.logging.type=emitter
a
Hmm, do you see these log lines
Starting emitter...
?
start()
should happen before the emitter starts `emit()`’ing events. But it seems like that’s not the case.
k
I see the below lines
Copy code
2024-09-24T08:04:09,894 INFO [Thread-89] org.apache.druid.emitter.dropwizard.DropwizardConverter - Using metric dimensions at types at [/etc/druid/conf/MetricDimension.json]
2024-09-24T08:04:09,895 WARN [Thread-89] org.apache.druid.java.util.metrics.MonitorScheduler - Monitor could not emit finally before being removed from scheduler
java.util.concurrent.RejectedExecutionException: Dropwizard emitter Service not started.
        at org.apache.druid.emitter.dropwizard.DropwizardEmitter.emit(DropwizardEmitter.java:96) ~[?:?]
        at org.apache.druid.java.util.emitter.core.ComposingEmitter.emit(ComposingEmitter.java:57) ~[druid-processing-27.0.0.3.2.2.0-1.jar:27.0.0.3.2.2.0-1]
      
...
and after few sec, all Druid services are going down/STOPPED automatically
And in the
composing
emitter combination,
logging
and
http
works fine without any issues as mentioend here
But NOT worked for
parametrized
with
dropwizard
combination for
composing
emitter
a
Hmm, let me check
k
Thank you @Abhishek Balaji Radhakrishnan.
I will test this as patch and let u know how it goes.
👍 1