public abstract class BaseEventConverter<E extends Exceptional> extends Object implements EventConverter<E>
Constructor and Description |
---|
BaseEventConverter(String eventType,
String eventMessage) |
Modifier and Type | Method and Description |
---|---|
org.elasticsearch.hadoop.util.ecs.ElasticCommonSchema.TemplateBuilder |
configureTemplate(org.elasticsearch.hadoop.util.ecs.ElasticCommonSchema.TemplateBuilder templateBuilder)
Perform some logic against the template builder in order to inject values before the template is built.
|
org.elasticsearch.hadoop.util.BytesArray |
generateEvent(E event,
org.elasticsearch.hadoop.util.ecs.MessageTemplate template)
Converts an event into an ECS compliant document using the given message template.
|
abstract String |
getRawEvent(E event)
Visible for testing
|
String |
getTimestamp(E event)
Visible for testing
|
String |
renderEventMessage(E event)
Visible for testing
|
String |
renderExceptionMessage(E event)
Visible for testing
|
String |
renderExceptionType(E event)
Visible for testing
|
public org.elasticsearch.hadoop.util.ecs.ElasticCommonSchema.TemplateBuilder configureTemplate(org.elasticsearch.hadoop.util.ecs.ElasticCommonSchema.TemplateBuilder templateBuilder)
EventConverter
configureTemplate
in interface EventConverter<E extends Exceptional>
public org.elasticsearch.hadoop.util.BytesArray generateEvent(E event, org.elasticsearch.hadoop.util.ecs.MessageTemplate template) throws IOException
EventConverter
generateEvent
in interface EventConverter<E extends Exceptional>
event
- Exceptional event to converttemplate
- template to use for conversionIOException
public abstract String getRawEvent(E event) throws IOException
IOException