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:50 GMT
Repository: hadoop
Updated Branches:
  refs/heads/trunk acf1e033b -> eb4045e76


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


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

Branch: refs/heads/trunk
Commit: eb4045e7652be6ceaf9dfd33e9139d67774b99ab
Parents: acf1e03
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:42 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/eb4045e7/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 becae36..1040626 100644
--- a/hadoop-common-project/hadoop-common/CHANGES.txt
+++ b/hadoop-common-project/hadoop-common/CHANGES.txt
@@ -394,6 +394,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/eb4045e7/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