Procházet zdrojové kódy

MAPREDUCE-6387. Serialize the recently added Task#encryptedSpillKey field at the end. (Arun Suresh via kasha)

(cherry picked from commit 6786daab33792c9c426adf0fc6b361f193d356a8)
(cherry picked from commit 1a2e6e8091d8578950a8623a023422ba5ee87d53)
Karthik Kambatla před 10 roky
rodič
revize
d404caaa43

+ 3 - 0
hadoop-mapreduce-project/CHANGES.txt

@@ -40,6 +40,9 @@ Release 2.7.1 - UNRELEASED
     copySucceeded() in one thread and copyFailed() in another thread on the
     same host. (Junping Du via ozawa)
 
+    MAPREDUCE-6387. Serialize the recently added Task#encryptedSpillKey field at 
+    the end. (Arun Suresh via kasha)
+
 Release 2.7.0 - 2015-04-20
 
   INCOMPATIBLE CHANGES

+ 2 - 2
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/Task.java

@@ -506,8 +506,8 @@ abstract public class Task implements Writable, Configurable {
     out.writeBoolean(taskCleanup);
     Text.writeString(out, user);
     out.writeInt(encryptedSpillKey.length);
-    out.write(encryptedSpillKey);
     extraData.write(out);
+    out.write(encryptedSpillKey);
   }
   
   public void readFields(DataInput in) throws IOException {
@@ -534,8 +534,8 @@ abstract public class Task implements Writable, Configurable {
     user = StringInterner.weakIntern(Text.readString(in));
     int len = in.readInt();
     encryptedSpillKey = new byte[len];
-    in.readFully(encryptedSpillKey);
     extraData.readFields(in);
+    in.readFully(encryptedSpillKey);
   }
 
   @Override