Class HttpPostEmitter
- java.lang.Object
-
- org.apache.druid.java.util.emitter.core.HttpPostEmitter
-
-
Constructor Summary
Constructors Constructor Description HttpPostEmitter(HttpEmitterConfig config, org.asynchttpclient.AsyncHttpClient client)
HttpPostEmitter(HttpEmitterConfig config, org.asynchttpclient.AsyncHttpClient client, com.fasterxml.jackson.databind.ObjectMapper jsonMapper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
emit(Event event)
Emit an event.void
flush()
ConcurrentTimeCounter
getBatchFillingTimeCounter()
int
getBuffersToEmit()
int
getBuffersToReuse()
long
getEventsToEmit()
ConcurrentTimeCounter
getFailedSendingTimeCounter()
long
getLargeEventsToEmit()
ConcurrentTimeCounter
getSuccessfulSendingTimeCounter()
int
getTotalAllocatedBuffers()
This and the following methods are public for external monitoring purposes.int
getTotalDroppedBuffers()
long
getTotalEmittedEvents()
int
getTotalFailedBuffers()
void
start()
String
toString()
-
-
-
Constructor Detail
-
HttpPostEmitter
public HttpPostEmitter(HttpEmitterConfig config, org.asynchttpclient.AsyncHttpClient client)
-
HttpPostEmitter
public HttpPostEmitter(HttpEmitterConfig config, org.asynchttpclient.AsyncHttpClient client, com.fasterxml.jackson.databind.ObjectMapper jsonMapper)
-
-
Method Detail
-
emit
public void emit(Event event)
Description copied from interface:Emitter
Emit 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.
-
flush
public void flush() throws IOException
- Specified by:
flush
in interfaceEmitter
- Specified by:
flush
in interfaceFlushable
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceEmitter
- Throws:
IOException
-
getTotalAllocatedBuffers
public int getTotalAllocatedBuffers()
This and the following methods are public for external monitoring purposes.
-
getBuffersToEmit
public int getBuffersToEmit()
-
getBuffersToReuse
public int getBuffersToReuse()
-
getTotalFailedBuffers
public int getTotalFailedBuffers()
-
getTotalDroppedBuffers
public int getTotalDroppedBuffers()
-
getTotalEmittedEvents
public long getTotalEmittedEvents()
-
getEventsToEmit
public long getEventsToEmit()
-
getLargeEventsToEmit
public long getLargeEventsToEmit()
-
getBatchFillingTimeCounter
public ConcurrentTimeCounter getBatchFillingTimeCounter()
-
getSuccessfulSendingTimeCounter
public ConcurrentTimeCounter getSuccessfulSendingTimeCounter()
-
getFailedSendingTimeCounter
public ConcurrentTimeCounter getFailedSendingTimeCounter()
-
-