public class BinaryAvroDecoder extends AbstractAvroDecoder
BinaryAvroDecoder decodes a byte array of AVRO Json Records into the Row structure.| Constructor and Description |
|---|
BinaryAvroDecoder(org.apache.avro.Schema schema) |
| Modifier and Type | Method and Description |
|---|---|
List<Row> |
decode(byte[] bytes)
Decodes byte array of binary encoded AVRO into list of
Row. |
getReader, getSchemapublic List<Row> decode(byte[] bytes) throws DecoderException
Row.
This method will iterate through each of the AVRO schema fields and translate
them into columns within the Row.
If the field is instance of List or Map it is converted into JSON
representation. In order to flatten or expand such columns other directives need
to be used.bytes - array of bytes that contains binary encoded AVRO record.Row that are converted from AVRO encoded binary messages.DecoderExceptionCopyright © 2024 CDAP Licensed under the Apache License, Version 2.0.