Author: gates Date: Tue Jul 29 17:43:52 2008 New Revision: 680890 URL: http://svn.apache.org/viewvc?rev=680890&view=rev Log: PIG-285 This patch makes it so the the script doesn't fail with error messages about not being able to instantiate the user provided comparator.
Modified: incubator/pig/branches/types/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/JobControlCompiler.java Modified: incubator/pig/branches/types/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/JobControlCompiler.java URL: http://svn.apache.org/viewvc/incubator/pig/branches/types/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/JobControlCompiler.java?rev=680890&r1=680889&r2=680890&view=diff ============================================================================== --- incubator/pig/branches/types/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/JobControlCompiler.java (original) +++ incubator/pig/branches/types/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/JobControlCompiler.java Tue Jul 29 17:43:52 2008 @@ -282,7 +282,7 @@ jobConf.setPartitionerClass(SortPartitioner.class); if(mro.UDFs.size()==1){ String compFuncSpec = mro.UDFs.get(0); - Class comparator = Class.forName(compFuncSpec); + Class comparator = PigContext.resolveClassName(compFuncSpec); if(ComparisonFunc.class.isAssignableFrom(comparator)) jobConf.setOutputKeyComparatorClass(comparator); }