You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pig.apache.org by ro...@apache.org on 2012/11/01 02:39:43 UTC

svn commit: r1404444 - in /pig/branches/branch-0.11: CHANGES.txt src/org/apache/pig/Main.java src/org/apache/pig/impl/PigContext.java

Author: rohini
Date: Thu Nov  1 01:39:42 2012
New Revision: 1404444

URL: http://svn.apache.org/viewvc?rev=1404444&view=rev
Log:
PIG-2832: org.apache.pig.pigunit.pig.PigServer does not initialize udf.import.list of PigContext (prkommireddi via rohini)

Modified:
    pig/branches/branch-0.11/CHANGES.txt
    pig/branches/branch-0.11/src/org/apache/pig/Main.java
    pig/branches/branch-0.11/src/org/apache/pig/impl/PigContext.java

Modified: pig/branches/branch-0.11/CHANGES.txt
URL: http://svn.apache.org/viewvc/pig/branches/branch-0.11/CHANGES.txt?rev=1404444&r1=1404443&r2=1404444&view=diff
==============================================================================
--- pig/branches/branch-0.11/CHANGES.txt (original)
+++ pig/branches/branch-0.11/CHANGES.txt Thu Nov  1 01:39:42 2012
@@ -28,6 +28,8 @@ PIG-1891 Enable StoreFunc to make intell
 
 IMPROVEMENTS
 
+PIG-2832: org.apache.pig.pigunit.pig.PigServer does not initialize udf.import.list of PigContext (prkommireddi via rohini)
+
 PIG-2898: Parallel execution of e2e tests (iveselovsky via rohini)
 
 PIG-2913: org.apache.pig.test.TestPigServerWithMacros fails sometimes because it picks up previous minicluster configuration file (cheolsoo via julien)

Modified: pig/branches/branch-0.11/src/org/apache/pig/Main.java
URL: http://svn.apache.org/viewvc/pig/branches/branch-0.11/src/org/apache/pig/Main.java?rev=1404444&r1=1404443&r2=1404444&view=diff
==============================================================================
--- pig/branches/branch-0.11/src/org/apache/pig/Main.java (original)
+++ pig/branches/branch-0.11/src/org/apache/pig/Main.java Thu Nov  1 01:39:42 2012
@@ -395,9 +395,6 @@ static int run(String args[], PigProgres
             pigContext.getProperties().setProperty("pig.optimizer.rules", ObjectSerializer.serialize(optimizerRules));
         }
 
-        if (properties.get("udf.import.list")!=null)
-            PigContext.initializeImportList((String)properties.get("udf.import.list"));
-
         PigContext.setClassLoader(pigContext.createCl(null));
 
         // construct the parameter substitution preprocessor

Modified: pig/branches/branch-0.11/src/org/apache/pig/impl/PigContext.java
URL: http://svn.apache.org/viewvc/pig/branches/branch-0.11/src/org/apache/pig/impl/PigContext.java?rev=1404444&r1=1404443&r2=1404444&view=diff
==============================================================================
--- pig/branches/branch-0.11/src/org/apache/pig/impl/PigContext.java (original)
+++ pig/branches/branch-0.11/src/org/apache/pig/impl/PigContext.java Thu Nov  1 01:39:42 2012
@@ -201,6 +201,17 @@ public class PigContext implements Seria
         skippedShipPaths.add("/sbin");
         skippedShipPaths.add("/usr/sbin");
         skippedShipPaths.add("/usr/local/sbin");
+        
+        init();
+    }
+
+    /**
+     * This method is created with the aim of unifying the Grunt and PigServer
+     * approaches, so all common initializations can go in here.
+     */
+    private void init() {
+        if (properties.get("udf.import.list")!=null)
+            PigContext.initializeImportList((String)properties.get("udf.import.list"));
     }
 
     public static void initializeImportList(String importListCommandLineProperties)