avro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject [2/2] avro git commit: AVRO-2055: Remove Magic Value From org.apache.avro.hadoop.io.AvroSequenceFile
Date Tue, 12 Sep 2017 13:58:55 GMT
AVRO-2055: Remove Magic Value From org.apache.avro.hadoop.io.AvroSequenceFile

Signed-off-by: sacharya <suraj@apache.org>
Signed-off-by: Gabor Szadovszky <gabor@apache.org>


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

Branch: refs/heads/master
Commit: 9f3ceefda1ee31c388f535a8d3007f0749119447
Parents: ce3f821
Author: BELUGA BEHR <dam6923@gmail.com>
Authored: Tue Sep 12 15:21:16 2017 +0200
Committer: Gabor Szadovszky <gabor@apache.org>
Committed: Tue Sep 12 15:21:29 2017 +0200

----------------------------------------------------------------------
 CHANGES.txt                                                 | 3 +++
 .../java/org/apache/avro/hadoop/io/AvroSequenceFile.java    | 9 +++++----
 2 files changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/avro/blob/9f3ceefd/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 95ffd0a..eba79d4 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -86,6 +86,9 @@ Trunk (not yet released)
     AVRO-2053: Remove Reference To Deprecated Property mapred.output.compression.type
     (Beluga Behr via gabor)
 
+    AVRO-2055: Remove Magic Value From org.apache.avro.hadoop.io.AvroSequenceFile
+    (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/9f3ceefd/lang/java/mapred/src/main/java/org/apache/avro/hadoop/io/AvroSequenceFile.java
----------------------------------------------------------------------
diff --git a/lang/java/mapred/src/main/java/org/apache/avro/hadoop/io/AvroSequenceFile.java
b/lang/java/mapred/src/main/java/org/apache/avro/hadoop/io/AvroSequenceFile.java
index fd0fd8f..36fc454 100644
--- a/lang/java/mapred/src/main/java/org/apache/avro/hadoop/io/AvroSequenceFile.java
+++ b/lang/java/mapred/src/main/java/org/apache/avro/hadoop/io/AvroSequenceFile.java
@@ -35,6 +35,9 @@ import org.apache.hadoop.util.Progressable;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import static org.apache.hadoop.fs.CommonConfigurationKeysPublic.IO_FILE_BUFFER_SIZE_DEFAULT;
+import static org.apache.hadoop.fs.CommonConfigurationKeysPublic.IO_FILE_BUFFER_SIZE_KEY;
+
 /**
  * A wrapper around a Hadoop {@link org.apache.hadoop.io.SequenceFile} that
  * also supports reading and writing Avro data.
@@ -109,9 +112,6 @@ public class AvroSequenceFile {
      * A helper class to encapsulate the options that can be used to construct a Writer.
      */
     public static class Options {
-      /** The default write buffer size in bytes. */
-      public static final int DEFAULT_BUFFER_SIZE_BYTES = 4096;
-
       /**
        * A magic value representing the default for buffer size, block size, and
        * replication factor.
@@ -437,7 +437,8 @@ public class AvroSequenceFile {
        */
       public int getBufferSizeBytes() {
         if (DEFAULT == mBufferSizeBytes) {
-          return getConfiguration().getInt("io.file.buffer.size", DEFAULT_BUFFER_SIZE_BYTES);
+          return getConfiguration().getInt(IO_FILE_BUFFER_SIZE_KEY,
+              IO_FILE_BUFFER_SIZE_DEFAULT);
         }
         return mBufferSizeBytes;
       }


Mime
View raw message