Author: daijy
Date: Fri Feb  5 05:59:02 2016
New Revision: 1728606

URL: http://svn.apache.org/viewvc?rev=1728606&view=rev
Log:
PIG-4795: Flushing ObjectOutputStream before calling toByteArray on the 
underlying ByteArrayOutputStream

Modified:
    pig/trunk/CHANGES.txt
    
pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/PigSplit.java

Modified: pig/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/pig/trunk/CHANGES.txt?rev=1728606&r1=1728605&r2=1728606&view=diff
==============================================================================
--- pig/trunk/CHANGES.txt (original)
+++ pig/trunk/CHANGES.txt Fri Feb  5 05:59:02 2016
@@ -89,6 +89,8 @@ PIG-4639: Add better parser for Apache H
 
 BUG FIXES
 
+PIG-4795: Flushing ObjectOutputStream before calling toByteArray on the 
underlying ByteArrayOutputStream (emopers via daijy)
+
 PIG-4690: Union with self replicate join will fail in Tez (rohini)
 
 PIG-4791: PORelationToExprProject filters records instead of returning 
emptybag in nested foreach after union (rohini)

Modified: 
pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/PigSplit.java
URL: 
http://svn.apache.org/viewvc/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/PigSplit.java?rev=1728606&r1=1728605&r2=1728606&view=diff
==============================================================================
--- 
pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/PigSplit.java
 (original)
+++ 
pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/PigSplit.java
 Fri Feb  5 05:59:02 2016
@@ -354,6 +354,7 @@ public class PigSplit extends InputSplit
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         ObjectOutputStream oos = new ObjectOutputStream(baos);
         oos.writeObject(obj);
+        oos.flush();
         byte[] bytes = baos.toByteArray();
         os.writeInt(bytes.length);
         os.write(bytes);


Reply via email to