Author: todd
Date: Sun Jul 27 19:04:14 2014
New Revision: 1613828

URL: http://svn.apache.org/r1613828
Log:
MAPREDUCE-5995. native-task: Revert changes to Text internals. Contributed by 
Todd Lipcon.

Modified:
    
hadoop/common/branches/MR-2841/hadoop-mapreduce-project/CHANGES.MAPREDUCE-2841.txt
    
hadoop/common/branches/MR-2841/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/main/java/org/apache/hadoop/mapred/nativetask/serde/TextSerializer.java

Modified: 
hadoop/common/branches/MR-2841/hadoop-mapreduce-project/CHANGES.MAPREDUCE-2841.txt
URL: 
http://svn.apache.org/viewvc/hadoop/common/branches/MR-2841/hadoop-mapreduce-project/CHANGES.MAPREDUCE-2841.txt?rev=1613828&r1=1613827&r2=1613828&view=diff
==============================================================================
--- 
hadoop/common/branches/MR-2841/hadoop-mapreduce-project/CHANGES.MAPREDUCE-2841.txt
 (original)
+++ 
hadoop/common/branches/MR-2841/hadoop-mapreduce-project/CHANGES.MAPREDUCE-2841.txt
 Sun Jul 27 19:04:14 2014
@@ -7,3 +7,4 @@ MAPREDUCE-5996. native-task: Rename syst
 MAPREDUCE-5997. native-task: Use DirectBufferPool from Hadoop Common (todd)
 MAPREDUCE-6000. native-task: Simplify ByteBufferDataReader/Writer (todd)
 MAPREDUCE-5991. native-task should not run unit tests if native profile is not 
enabled. (Binglin Chang)
+MAPREDUCE-5995. native-task: Revert changes to Text internals (todd)

Modified: 
hadoop/common/branches/MR-2841/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/main/java/org/apache/hadoop/mapred/nativetask/serde/TextSerializer.java
URL: 
http://svn.apache.org/viewvc/hadoop/common/branches/MR-2841/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/main/java/org/apache/hadoop/mapred/nativetask/serde/TextSerializer.java?rev=1613828&r1=1613827&r2=1613828&view=diff
==============================================================================
--- 
hadoop/common/branches/MR-2841/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/main/java/org/apache/hadoop/mapred/nativetask/serde/TextSerializer.java
 (original)
+++ 
hadoop/common/branches/MR-2841/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/main/java/org/apache/hadoop/mapred/nativetask/serde/TextSerializer.java
 Sun Jul 27 19:04:14 2014
@@ -42,13 +42,6 @@ public class TextSerializer implements I
 
   @Override
   public void deserialize(DataInput in, int length, Text w) throws IOException 
{
-    try {
-      w.setCapacity(length, true);
-      w.setLength(length);
-    } catch (final Exception e) {
-      throw new IOException(e);
-    }
-    final byte[] bytes = w.getBytes();
-    in.readFully(bytes, 0, length);
+    w.readWithKnownLength(in, length);
   }
 }


Reply via email to