hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1100056 - in /hadoop/common/trunk: CHANGES.txt src/java/org/apache/hadoop/io/WritableComparator.java
Date Fri, 06 May 2011 05:07:22 GMT
Author: eli
Date: Fri May  6 05:07:22 2011
New Revision: 1100056

URL: http://svn.apache.org/viewvc?rev=1100056&view=rev
Log:
HADOOP-7183. WritableComparator.get should not cache comparator objects. Contributed by Tom
White

Modified:
    hadoop/common/trunk/CHANGES.txt
    hadoop/common/trunk/src/java/org/apache/hadoop/io/WritableComparator.java

Modified: hadoop/common/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/CHANGES.txt?rev=1100056&r1=1100055&r2=1100056&view=diff
==============================================================================
--- hadoop/common/trunk/CHANGES.txt (original)
+++ hadoop/common/trunk/CHANGES.txt Fri May  6 05:07:22 2011
@@ -682,6 +682,9 @@ Release 0.21.1 - Unreleased
     HADOOP-7194. Fix resource leak in IOUtils.copyBytes(..).
     (Devaraj K via szetszwo)
 
+    HADOOP-7183. WritableComparator.get should not cache comparator objects.
+    (tomwhite via eli)
+
 Release 0.21.0 - 2010-08-13
 
   INCOMPATIBLE CHANGES

Modified: hadoop/common/trunk/src/java/org/apache/hadoop/io/WritableComparator.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/src/java/org/apache/hadoop/io/WritableComparator.java?rev=1100056&r1=1100055&r2=1100056&view=diff
==============================================================================
--- hadoop/common/trunk/src/java/org/apache/hadoop/io/WritableComparator.java (original)
+++ hadoop/common/trunk/src/java/org/apache/hadoop/io/WritableComparator.java Fri May  6 05:07:22
2011
@@ -53,7 +53,6 @@ public class WritableComparator implemen
       // if not, use the generic one
       if (comparator == null) {
         comparator = new WritableComparator(c, true);
-        comparators.put(c, comparator);
       }
     }
     return comparator;
@@ -75,7 +74,8 @@ public class WritableComparator implemen
   } 
 
   /** Register an optimized comparator for a {@link WritableComparable}
-   * implementation. */
+   * implementation. Comparators registered with this method must be
+   * thread-safe. */
   public static synchronized void define(Class c,
                                          WritableComparator comparator) {
     comparators.put(c, comparator);



Mime
View raw message