diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index 5e7b03524a..2fb8b81e51 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -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 diff --git a/hadoop-mapreduce-project/src/test/mapred/org/apache/hadoop/fs/slive/SlivePartitioner.java b/hadoop-mapreduce-project/src/test/mapred/org/apache/hadoop/fs/slive/SlivePartitioner.java index dfe602a936..4016124afb 100644 --- a/hadoop-mapreduce-project/src/test/mapred/org/apache/hadoop/fs/slive/SlivePartitioner.java +++ b/hadoop-mapreduce-project/src/test/mapred/org/apache/hadoop/fs/slive/SlivePartitioner.java @@ -34,6 +34,6 @@ public void configure(JobConf conf) {} @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; } }