You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-commits@hadoop.apache.org by jg...@apache.org on 2011/11/02 20:48:53 UTC

svn commit: r1196782 - in /hadoop/common/branches/branch-0.22/mapreduce: CHANGES.txt src/test/mapred/org/apache/hadoop/fs/slive/SlivePartitioner.java

Author: jghoman
Date: Wed Nov  2 19:48:52 2011
New Revision: 1196782

URL: http://svn.apache.org/viewvc?rev=1196782&view=rev
Log:
MAPREDUCE-3139. Merge from trunk to 0.22.


Modified:
    hadoop/common/branches/branch-0.22/mapreduce/CHANGES.txt
    hadoop/common/branches/branch-0.22/mapreduce/src/test/mapred/org/apache/hadoop/fs/slive/SlivePartitioner.java

Modified: hadoop/common/branches/branch-0.22/mapreduce/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.22/mapreduce/CHANGES.txt?rev=1196782&r1=1196781&r2=1196782&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.22/mapreduce/CHANGES.txt (original)
+++ hadoop/common/branches/branch-0.22/mapreduce/CHANGES.txt Wed Nov  2 19:48:52 2011
@@ -629,6 +629,8 @@ Release 0.22.0 - Unreleased
     MAPREDUCE-2328. Add memory-related configuration parameters to
     mapred-default.xml. (Harsh J via shv)
 
+    MAPREDUCE-3139. SlivePartitioner generates negative partitions. (jghoman)
+
 Release 0.21.1 - Unreleased
 
   NEW FEATURES

Modified: hadoop/common/branches/branch-0.22/mapreduce/src/test/mapred/org/apache/hadoop/fs/slive/SlivePartitioner.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.22/mapreduce/src/test/mapred/org/apache/hadoop/fs/slive/SlivePartitioner.java?rev=1196782&r1=1196781&r2=1196782&view=diff
==============================================================================
--- hadoop/common/branches/branch-0.22/mapreduce/src/test/mapred/org/apache/hadoop/fs/slive/SlivePartitioner.java (original)
+++ hadoop/common/branches/branch-0.22/mapreduce/src/test/mapred/org/apache/hadoop/fs/slive/SlivePartitioner.java Wed Nov  2 19:48:52 2011
@@ -34,6 +34,6 @@ public class SlivePartitioner implements
   @Override // Partitioner
   public int getPartition(Text key, Text value, int numPartitions) {
     OperationOutput oo = new OperationOutput(key, value);
-    return oo.getOperationType().hashCode() % numPartitions;
+    return (oo.getOperationType().hashCode() & Integer.MAX_VALUE) % numPartitions;
   }
 }