avro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tomwh...@apache.org
Subject avro git commit: AVRO-1881 - Avro (Java) Memory Leak when reusing JsonDecoder instance. Contributed by Nandor Kollar.
Date Tue, 10 Jan 2017 14:59:38 GMT
Repository: avro
Updated Branches:
  refs/heads/master d559a7e87 -> 4f53fa933


AVRO-1881 - Avro (Java) Memory Leak when reusing JsonDecoder instance. Contributed by Nandor
Kollar.


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

Branch: refs/heads/master
Commit: 4f53fa933447865d7afb22c5d7d472d87fc2a4ae
Parents: d559a7e
Author: Nandor Kollar <nkollar@cloudera.com>
Authored: Wed Jan 4 13:36:00 2017 +0100
Committer: Tom White <tom@cloudera.com>
Committed: Tue Jan 10 14:58:11 2017 +0000

----------------------------------------------------------------------
 CHANGES.txt                                                      | 3 +++
 lang/java/avro/src/main/java/org/apache/avro/io/JsonDecoder.java | 4 ++++
 2 files changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/avro/blob/4f53fa93/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index e5ab1b0..2634eef 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -111,6 +111,9 @@ Trunk (not yet released)
 
     AVRO-1970: Java: Flaky test: TestInputBytes. (Gabor Szadovszky via tomwhite)
 
+    AVRO-1881: Java: Avro (Java) Memory Leak when reusing JsonDecoder instance.
+    (Nandor Kollar via tomwhite)
+
 Avro 1.8.1 (14 May 2016)
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/avro/blob/4f53fa93/lang/java/avro/src/main/java/org/apache/avro/io/JsonDecoder.java
----------------------------------------------------------------------
diff --git a/lang/java/avro/src/main/java/org/apache/avro/io/JsonDecoder.java b/lang/java/avro/src/main/java/org/apache/avro/io/JsonDecoder.java
index 34a1862..78fafaa 100644
--- a/lang/java/avro/src/main/java/org/apache/avro/io/JsonDecoder.java
+++ b/lang/java/avro/src/main/java/org/apache/avro/io/JsonDecoder.java
@@ -105,6 +105,8 @@ public class JsonDecoder extends ParsingDecoder
       throw new NullPointerException("InputStream to read from cannot be null!");
     }
     parser.reset();
+    reorderBuffers.clear();
+    currentReorderBuffer = null;
     this.in = jsonFactory.createJsonParser(in);
     this.in.nextToken();
     return this;
@@ -127,6 +129,8 @@ public class JsonDecoder extends ParsingDecoder
       throw new NullPointerException("String to read from cannot be null!");
     }
     parser.reset();
+    reorderBuffers.clear();
+    currentReorderBuffer = null;
     this.in = new JsonFactory().createJsonParser(in);
     this.in.nextToken();
     return this;


Mime
View raw message