You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pig.apache.org by ch...@apache.org on 2013/08/30 22:04:31 UTC
svn commit: r1519062 [5/5] - in /pig/trunk: ./ src/META-INF/services/
src/org/apache/pig/ src/org/apache/pig/backend/executionengine/
src/org/apache/pig/backend/hadoop/executionengine/
src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/ s...
Modified: pig/trunk/test/org/apache/pig/test/TestProjectRange.java
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/TestProjectRange.java?rev=1519062&r1=1519061&r2=1519062&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/test/TestProjectRange.java (original)
+++ pig/trunk/test/org/apache/pig/test/TestProjectRange.java Fri Aug 30 20:04:29 2013
@@ -32,6 +32,7 @@ import junit.framework.Assert;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.pig.ExecType;
+import org.apache.pig.ExecTypeProvider;
import org.apache.pig.PigServer;
import org.apache.pig.backend.executionengine.ExecException;
import org.apache.pig.data.Tuple;
@@ -76,7 +77,7 @@ public class TestProjectRange {
String execTypeString = System.getProperty("test.exectype");
if(execTypeString!=null && execTypeString.length()>0){
- execType = ExecType.fromString(execTypeString);
+ execType = ExecTypeProvider.fromString(execTypeString);
}
String[] input = {"10\t20\t30\t40\t50", "11\t21\t31\t41\t51"};
Modified: pig/trunk/test/org/apache/pig/test/Util.java
URL: http://svn.apache.org/viewvc/pig/trunk/test/org/apache/pig/test/Util.java?rev=1519062&r1=1519061&r2=1519062&view=diff
==============================================================================
--- pig/trunk/test/org/apache/pig/test/Util.java (original)
+++ pig/trunk/test/org/apache/pig/test/Util.java Fri Aug 30 20:04:29 2013
@@ -65,6 +65,7 @@ import org.apache.pig.PigServer;
import org.apache.pig.ResourceSchema.ResourceFieldSchema;
import org.apache.pig.backend.executionengine.ExecException;
import org.apache.pig.backend.hadoop.datastorage.ConfigurationUtil;
+import org.apache.pig.backend.hadoop.executionengine.MRExecutionEngine;
import org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MRCompiler;
import org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher;
import org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.plans.MROperPlan;
@@ -1024,12 +1025,9 @@ public class Util {
public static PhysicalPlan buildPp(PigServer pigServer, String query)
throws Exception {
- buildLp( pigServer, query );
- java.lang.reflect.Method compilePp = pigServer.getClass().getDeclaredMethod("compilePp" );
- compilePp.setAccessible(true);
-
- return (PhysicalPlan)compilePp.invoke( pigServer );
-
+ LogicalPlan lp = buildLp( pigServer, query );
+ return ((MRExecutionEngine)pigServer.getPigContext().getExecutionEngine()).compile(lp,
+ pigServer.getPigContext().getProperties());
}
public static LogicalPlan parse(String query, PigContext pc) throws FrontendException {