This is an automated email from the ASF dual-hosted git repository.
rskraba pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/avro.git
The following commit(s) were added to refs/heads/master by this push:
new ba3ad6d AVRO-3183: Do Not Double Buffer Data in DataFileWriter (#1300)
ba3ad6d is described below
commit ba3ad6d7db72cb063c559babc1ef4ff8cb1c0c32
Author: belugabehr <[email protected]>
AuthorDate: Fri Aug 6 09:43:19 2021 -0400
AVRO-3183: Do Not Double Buffer Data in DataFileWriter (#1300)
---
lang/java/avro/src/main/java/org/apache/avro/file/DataFileWriter.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/lang/java/avro/src/main/java/org/apache/avro/file/DataFileWriter.java
b/lang/java/avro/src/main/java/org/apache/avro/file/DataFileWriter.java
index 56bca3e..c9a0577 100644
--- a/lang/java/avro/src/main/java/org/apache/avro/file/DataFileWriter.java
+++ b/lang/java/avro/src/main/java/org/apache/avro/file/DataFileWriter.java
@@ -238,10 +238,10 @@ public class DataFileWriter<D> implements Closeable,
Flushable {
this.underlyingStream = outs;
this.out = new BufferedFileOutputStream(outs);
EncoderFactory efactory = new EncoderFactory();
- this.vout = efactory.binaryEncoder(out, null);
+ this.vout = efactory.directBinaryEncoder(out, null);
dout.setSchema(schema);
buffer = new NonCopyingByteArrayOutputStream(Math.min((int) (syncInterval
* 1.25), Integer.MAX_VALUE / 2 - 1));
- this.bufOut = efactory.binaryEncoder(buffer, null);
+ this.bufOut = efactory.directBinaryEncoder(buffer, null);
if (this.codec == null) {
this.codec = CodecFactory.nullCodec().createInstance();
}