Author: rding
Date: Wed Aug  4 17:28:35 2010
New Revision: 982341

URL: http://svn.apache.org/viewvc?rev=982341&view=rev
Log:
PIG-1527: No need to deserialize UDFContext on the client side

Modified:
    hadoop/pig/trunk/CHANGES.txt
    
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/util/MapRedUtil.java
    hadoop/pig/trunk/src/org/apache/pig/impl/util/UDFContext.java

Modified: hadoop/pig/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/CHANGES.txt?rev=982341&r1=982340&r2=982341&view=diff
==============================================================================
--- hadoop/pig/trunk/CHANGES.txt (original)
+++ hadoop/pig/trunk/CHANGES.txt Wed Aug  4 17:28:35 2010
@@ -375,6 +375,8 @@ OPTIMIZATIONS
 
 BUG FIXES
 
+PIG-1527: No need to deserialize UDFContext on the client side (rding)
+
 PIG-1507: Full outer join fails while doing a filter on joined data (daijy)
 
 PIG-1493: Column Pruner throw exception "inconsistent pruning" (daijy)

Modified: 
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/util/MapRedUtil.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/util/MapRedUtil.java?rev=982341&r1=982340&r2=982341&view=diff
==============================================================================
--- 
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/util/MapRedUtil.java
 (original)
+++ 
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/util/MapRedUtil.java
 Wed Aug  4 17:28:35 2010
@@ -138,7 +138,10 @@ public class MapRedUtil {
     public static void setupUDFContext(Configuration job) throws IOException {
         UDFContext udfc = UDFContext.getUDFContext();
         udfc.addJobConf(job);
-        udfc.deserialize();
+        // don't deserialize in front-end 
+        if (udfc.isUDFConfEmpty()) {
+            udfc.deserialize();
+        }
     }
     
     public static FileSpec checkLeafIsStore(

Modified: hadoop/pig/trunk/src/org/apache/pig/impl/util/UDFContext.java
URL: 
http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/impl/util/UDFContext.java?rev=982341&r1=982340&r2=982341&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/impl/util/UDFContext.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/impl/util/UDFContext.java Wed Aug  4 
17:28:35 2010
@@ -195,4 +195,8 @@ public class UDFContext {
     public void reset() {
         udfConfs.clear();
     }
+    
+    public boolean isUDFConfEmpty() {
+        return udfConfs.isEmpty();
+    }
 }
\ No newline at end of file


Reply via email to