hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From w...@apache.org
Subject hadoop git commit: HADOOP-11323. WritableComparator#compare keeps reference to byte array. Contributed by Wilfred Spiegelenburg.
Date Thu, 20 Nov 2014 19:06:54 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 4b99bde92 -> 85bdc3a01


HADOOP-11323. WritableComparator#compare keeps reference to byte array. Contributed by Wilfred
Spiegelenburg.

(cherry picked from commit eb4045e7652be6ceaf9dfd33e9139d67774b99ab)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/85bdc3a0
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/85bdc3a0
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/85bdc3a0

Branch: refs/heads/branch-2
Commit: 85bdc3a013ab320a48e251ee51b2ca6a1156963c
Parents: 4b99bde
Author: Andrew Wang <wang@apache.org>
Authored: Thu Nov 20 11:05:42 2014 -0800
Committer: Andrew Wang <wang@apache.org>
Committed: Thu Nov 20 11:05:50 2014 -0800

----------------------------------------------------------------------
 hadoop-common-project/hadoop-common/CHANGES.txt                   | 3 +++
 .../src/main/java/org/apache/hadoop/io/WritableComparator.java    | 1 +
 2 files changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/85bdc3a0/hadoop-common-project/hadoop-common/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt
index b8e9ff1..e659077 100644
--- a/hadoop-common-project/hadoop-common/CHANGES.txt
+++ b/hadoop-common-project/hadoop-common/CHANGES.txt
@@ -36,6 +36,9 @@ Release 2.7.0 - UNRELEASED
 
   OPTIMIZATIONS
 
+    HADOOP-11323. WritableComparator#compare keeps reference to byte array.
+    (Wilfred Spiegelenburg via wang)
+
   BUG FIXES
 
     HADOOP-11236. NFS: Fix javadoc warning in RpcProgram.java (Abhiraj Butala via harsh)

http://git-wip-us.apache.org/repos/asf/hadoop/blob/85bdc3a0/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/WritableComparator.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/WritableComparator.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/WritableComparator.java
index b2738ff..35c6ef9 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/WritableComparator.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/WritableComparator.java
@@ -160,6 +160,7 @@ public class WritableComparator implements RawComparator, Configurable
{
       buffer.reset(b2, s2, l2);                   // parse key2
       key2.readFields(buffer);
       
+      buffer.reset(null, 0, 0);                   // clean up reference
     } catch (IOException e) {
       throw new RuntimeException(e);
     }


Mime
View raw message