hadoop-mapreduce-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgho...@apache.org
Subject svn commit: r1196776 - in /hadoop/common/trunk/hadoop-mapreduce-project: CHANGES.txt src/test/mapred/org/apache/hadoop/fs/slive/SlivePartitioner.java
Date Wed, 02 Nov 2011 19:38:31 GMT
Author: jghoman
Date: Wed Nov  2 19:38:31 2011
New Revision: 1196776

URL: http://svn.apache.org/viewvc?rev=1196776&view=rev
Log:
MAPREDUCE-3139. SlivePartitioner generates negative partitions.

Modified:
    hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt
    hadoop/common/trunk/hadoop-mapreduce-project/src/test/mapred/org/apache/hadoop/fs/slive/SlivePartitioner.java

Modified: hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt?rev=1196776&r1=1196775&r2=1196776&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt (original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt Wed Nov  2 19:38:31 2011
@@ -2506,6 +2506,8 @@ Release 0.22.0 - Unreleased
     MAPREDUCE-2531. Fixed jobcontrol to downgrade JobID. (Robert Evans via
     acmurthy) 
 
+    MAPREDUCE-3139. SlivePartitioner generates negative partitions. (jghoman)
+
 Release 0.21.1 - Unreleased
 
   NEW FEATURES

Modified: hadoop/common/trunk/hadoop-mapreduce-project/src/test/mapred/org/apache/hadoop/fs/slive/SlivePartitioner.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/src/test/mapred/org/apache/hadoop/fs/slive/SlivePartitioner.java?rev=1196776&r1=1196775&r2=1196776&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-mapreduce-project/src/test/mapred/org/apache/hadoop/fs/slive/SlivePartitioner.java
(original)
+++ hadoop/common/trunk/hadoop-mapreduce-project/src/test/mapred/org/apache/hadoop/fs/slive/SlivePartitioner.java
Wed Nov  2 19:38:31 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;
   }
 }



Mime
View raw message