avro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject [4/5] avro git commit: AVRO-2049: Remove Superfluous Configuration From AvroSerializer
Date Fri, 28 Jul 2017 07:17:22 GMT
AVRO-2049: Remove Superfluous Configuration From AvroSerializer


Project: http://git-wip-us.apache.org/repos/asf/avro/repo
Commit: http://git-wip-us.apache.org/repos/asf/avro/commit/91d4cc03
Tree: http://git-wip-us.apache.org/repos/asf/avro/tree/91d4cc03
Diff: http://git-wip-us.apache.org/repos/asf/avro/diff/91d4cc03

Branch: refs/heads/master
Commit: 91d4cc03bbe84ca2aa0ed7f9094a20061b04a8a3
Parents: d0cce25
Author: BELUGA BEHR <dam6923@gmail.com>
Authored: Thu Jul 27 10:00:15 2017 +0200
Committer: Gabor Szadovszky <gabor@apache.org>
Committed: Thu Jul 27 10:17:49 2017 +0200

----------------------------------------------------------------------
 CHANGES.txt                                              |  3 +++
 .../java/org/apache/avro/hadoop/io/AvroSerializer.java   | 11 +----------
 .../java/org/apache/avro/mapred/AvroSerialization.java   |  3 +--
 3 files changed, 5 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/avro/blob/91d4cc03/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 61c248f..72dd022 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -67,6 +67,9 @@ Trunk (not yet released)
     AVRO-2050: Clear Array To Allow GC
     (Beluga Behr via gabor)
 
+    AVRO-2049: Remove Superfluous Configuration From AvroSerializer
+    (Beluga Behr via gabor)
+
   BUG FIXES
 
     AVRO-1741: Python3: Fix error when codec is not in the header.

http://git-wip-us.apache.org/repos/asf/avro/blob/91d4cc03/lang/java/mapred/src/main/java/org/apache/avro/hadoop/io/AvroSerializer.java
----------------------------------------------------------------------
diff --git a/lang/java/mapred/src/main/java/org/apache/avro/hadoop/io/AvroSerializer.java
b/lang/java/mapred/src/main/java/org/apache/avro/hadoop/io/AvroSerializer.java
index 560c37f..e71e0bb 100644
--- a/lang/java/mapred/src/main/java/org/apache/avro/hadoop/io/AvroSerializer.java
+++ b/lang/java/mapred/src/main/java/org/apache/avro/hadoop/io/AvroSerializer.java
@@ -44,18 +44,9 @@ import org.apache.hadoop.io.serializer.Serializer;
  * @param <T> The Java type of the Avro data.
  */
 public class AvroSerializer<T> implements Serializer<AvroWrapper<T>> {
-  /**
-   * The block size for the Avro encoder.
-   *
-   * This number was copied from the AvroSerialization of org.apache.avro.mapred in Avro
1.5.1.
-   *
-   * TODO(gwu): Do some benchmarking with different numbers here to see if it is important.
-   */
-  private static final int AVRO_ENCODER_BLOCK_SIZE_BYTES = 512;
 
   /** An factory for creating Avro datum encoders. */
-  private static EncoderFactory mEncoderFactory
-      = new EncoderFactory().configureBlockSize(AVRO_ENCODER_BLOCK_SIZE_BYTES);
+  private static EncoderFactory mEncoderFactory = new EncoderFactory();
 
   /** The writer schema for the data to serialize. */
   private final Schema mWriterSchema;

http://git-wip-us.apache.org/repos/asf/avro/blob/91d4cc03/lang/java/mapred/src/main/java/org/apache/avro/mapred/AvroSerialization.java
----------------------------------------------------------------------
diff --git a/lang/java/mapred/src/main/java/org/apache/avro/mapred/AvroSerialization.java
b/lang/java/mapred/src/main/java/org/apache/avro/mapred/AvroSerialization.java
index fa8334b..c9c5df5 100644
--- a/lang/java/mapred/src/main/java/org/apache/avro/mapred/AvroSerialization.java
+++ b/lang/java/mapred/src/main/java/org/apache/avro/mapred/AvroSerialization.java
@@ -119,8 +119,7 @@ public class AvroSerialization<T> extends Configured
 
     public void open(OutputStream out) {
       this.out = out;
-      this.encoder = new EncoderFactory().configureBlockSize(512)
-          .binaryEncoder(out, null);
+      this.encoder = new EncoderFactory().binaryEncoder(out, null);
     }
 
     public void serialize(AvroWrapper<T> wrapper) throws IOException {


Mime
View raw message