diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index 6d5013887d..71fcd95b8b 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -130,6 +130,9 @@ Release 2.0.1-alpha - UNRELEASED MAPREDUCE-4002. MultiFileWordCount job fails if the input path is not from default file system. (Bhallamudi Venkata Siva Kamesh via todd) + MAPREDUCE-4274 MapOutputBuffer should use native byte order for kvmeta. + (todd via bobby) + Release 2.0.0-alpha - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/MapTask.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/MapTask.java index f83c07e0e0..1232645ca6 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/MapTask.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/MapTask.java @@ -25,6 +25,7 @@ import java.io.IOException; import java.io.OutputStream; import java.nio.ByteBuffer; +import java.nio.ByteOrder; import java.nio.IntBuffer; import java.util.ArrayList; import java.util.List; @@ -911,7 +912,9 @@ public MapOutputBuffer(TaskUmbilicalProtocol umbilical, JobConf job, maxMemUsage -= maxMemUsage % METASIZE; kvbuffer = new byte[maxMemUsage]; bufvoid = kvbuffer.length; - kvmeta = ByteBuffer.wrap(kvbuffer).asIntBuffer(); + kvmeta = ByteBuffer.wrap(kvbuffer) + .order(ByteOrder.nativeOrder()) + .asIntBuffer(); setEquator(0); bufstart = bufend = bufindex = equator; kvstart = kvend = kvindex;