Hi all,

I am working on a task involving serde of Avro generic records and was
looking at the beam provided
org.apache.beam.sdk.extensions.avro.coders.AvroCoder custom coder. The avro
binary encoder and decoder being used are DirectBinaryEncoder and
not BufferedBinaryEncoder. Does anyone know why DirectBinaryEncoder is
preferred in beam over BufferedBinaryEncoder.

The java doc for DirectBinaryEncoder says it is slower than the buffered
one.

*"This encoder does not buffer writes, and as a result is slower than
BufferedBinaryEncoder. However, it is lighter-weight and useful when the
buffering in BufferedBinaryEncoder is not desired and/or the Encoder is
very short lived."*

Thanks,
Vignesh

Reply via email to