Search in sources :

Example 1 with LoggingEmitter

use of org.apache.druid.java.util.emitter.core.LoggingEmitter in project druid by druid-io.

the class LoggingEmitterFactory method makeEmitter.

public Emitter makeEmitter(ObjectMapper objectMapper, Lifecycle lifecycle) {
    Emitter retVal = new LoggingEmitter(this, objectMapper);
    lifecycle.addManagedInstance(retVal);
    return retVal;
}
Also used : Emitter(org.apache.druid.java.util.emitter.core.Emitter) LoggingEmitter(org.apache.druid.java.util.emitter.core.LoggingEmitter) LoggingEmitter(org.apache.druid.java.util.emitter.core.LoggingEmitter)

Example 2 with LoggingEmitter

use of org.apache.druid.java.util.emitter.core.LoggingEmitter in project druid by druid-io.

the class LookupCoordinatorManagerTest method setUpStatic.

@BeforeClass
public static void setUpStatic() {
    LoggingEmitter loggingEmitter = EasyMock.createNiceMock(LoggingEmitter.class);
    EasyMock.replay(loggingEmitter);
    SERVICE_EMITTER = new ServiceEmitter("", "", loggingEmitter) {

        @Override
        public void emit(Event event) {
            EVENT_EMITS.incrementAndGet();
            super.emit(event);
        }
    };
    EmittingLogger.registerEmitter(SERVICE_EMITTER);
}
Also used : ServiceEmitter(org.apache.druid.java.util.emitter.service.ServiceEmitter) Event(org.apache.druid.java.util.emitter.core.Event) LoggingEmitter(org.apache.druid.java.util.emitter.core.LoggingEmitter) BeforeClass(org.junit.BeforeClass)

Aggregations

LoggingEmitter (org.apache.druid.java.util.emitter.core.LoggingEmitter)2 Emitter (org.apache.druid.java.util.emitter.core.Emitter)1 Event (org.apache.druid.java.util.emitter.core.Event)1 ServiceEmitter (org.apache.druid.java.util.emitter.service.ServiceEmitter)1 BeforeClass (org.junit.BeforeClass)1