MAPREDUCE-3139. Merge from trunk to 0.23.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.23@1196783 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jakob Homan 2011-11-02 19:57:19 +00:00
parent 05a029171c
commit 5ed437781f
2 changed files with 3 additions and 1 deletions

View File

@ -2467,6 +2467,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

View File

@ -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;
}
}