Class ServiceEmitter
- java.lang.Object
-
- org.apache.druid.java.util.emitter.service.ServiceEmitter
-
-
Constructor Summary
Constructors Constructor Description ServiceEmitter(String service, String host, Emitter emitter)ServiceEmitter(String service, String host, Emitter emitter, com.google.common.collect.ImmutableMap<String,String> otherServiceDimensions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidemit(Event event)Emit an event.<E extends Event>
voidemit(ServiceEventBuilder<E> builder)voidflush()voidstart()StringtoString()
-
-
-
Method Detail
-
emit
public void emit(Event event)
Description copied from interface:EmitterEmit an event. This method must not throw exceptions or block. If an implementation receives too many events and internal queues fill up, it should drop events rather than blocking or consuming excessive memory. If an implementation receives input it considers to be invalid, or has an internal problem, it should deal with that by logging a warning rather than throwing an exception. Implementations that log warnings should consider throttling warnings to avoid excessive logs, since a busy Druid cluster can emit a high volume of metric events.
-
emit
public <E extends Event> void emit(ServiceEventBuilder<E> builder)
-
flush
public void flush() throws IOException- Specified by:
flushin interfaceEmitter- Specified by:
flushin interfaceFlushable- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceEmitter- Throws:
IOException
-
-