public class AvroParser extends Object implements EntityParser<org.apache.avro.generic.GenericRecord>
EntityParser
that parses Avro serialized bytes from an event.
The Avro schema used to serialize the data should be set as either a URL
or literal in the flume.avro.schema.url or flume.avro.schema.literal event
headers respectively.Modifier and Type | Class and Description |
---|---|
static class |
AvroParser.Builder |
Modifier and Type | Method and Description |
---|---|
org.apache.avro.generic.GenericRecord |
parse(Event event,
org.apache.avro.generic.GenericRecord reuse)
Parse the entity from the body of the given event.
|
public org.apache.avro.generic.GenericRecord parse(Event event, org.apache.avro.generic.GenericRecord reuse) throws EventDeliveryException, NonRecoverableEventException
parse
in interface EntityParser<org.apache.avro.generic.GenericRecord>
event
- The event to parse.reuse
- If non-null, this may be reused and returned from this method.EventDeliveryException
- A recoverable error such as an error
downloading the schema from the URL has
occurred.NonRecoverableEventException
- A non-recoverable error such as an
unparsable schema or entity has
occurred.Copyright © 2009–2019 Apache Software Foundation. All rights reserved.