pig-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r611983 - in /incubator/pig/trunk: CHANGES.txt src/org/apache/pig/impl/physicalLayer/MapreducePlanCompiler.java src/org/apache/pig/impl/physicalLayer/POMapreduce.java
Date Tue, 15 Jan 2008 00:51:45 GMT
Author: gates
Date: Mon Jan 14 16:51:44 2008
New Revision: 611983

URL: http://svn.apache.org/viewvc?rev=611983&view=rev
Log:
PIG-61: Fixed MapreducePlanCompiler to use PigContext to load up the
comparator function instead of Class.forName.


Modified:
    incubator/pig/trunk/CHANGES.txt
    incubator/pig/trunk/src/org/apache/pig/impl/physicalLayer/MapreducePlanCompiler.java
    incubator/pig/trunk/src/org/apache/pig/impl/physicalLayer/POMapreduce.java

Modified: incubator/pig/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/pig/trunk/CHANGES.txt?rev=611983&r1=611982&r2=611983&view=diff
==============================================================================
--- incubator/pig/trunk/CHANGES.txt (original)
+++ incubator/pig/trunk/CHANGES.txt Mon Jan 14 16:51:44 2008
@@ -62,3 +62,6 @@
 	PIG-30: Rewrote DataBags to better handle decisions of when to spill to
 	disk and to spill more intelligently. (gates)
 
+	PIG-61: Fixed MapreducePlanCompiler to use PigContext to load up the
+	comparator function instead of Class.forName.  (gates)
+

Modified: incubator/pig/trunk/src/org/apache/pig/impl/physicalLayer/MapreducePlanCompiler.java
URL: http://svn.apache.org/viewvc/incubator/pig/trunk/src/org/apache/pig/impl/physicalLayer/MapreducePlanCompiler.java?rev=611983&r1=611982&r2=611983&view=diff
==============================================================================
--- incubator/pig/trunk/src/org/apache/pig/impl/physicalLayer/MapreducePlanCompiler.java (original)
+++ incubator/pig/trunk/src/org/apache/pig/impl/physicalLayer/MapreducePlanCompiler.java Mon
Jan 14 16:51:44 2008
@@ -310,12 +310,9 @@
     	
     	String comparatorFuncName = loSort.getSortSpec().getComparatorName();
     	if (comparatorFuncName != null) {
-    		try {
-    			sortJob.userComparator = 
-    				(Class<WritableComparator>)Class.forName(comparatorFuncName);
-    		} catch (ClassNotFoundException e) {
-    			throw new RuntimeException("Unable to find user comparator " + comparatorFuncName,
e);
-    		}
+    		sortJob.userComparator =
+                (Class<WritableComparator>)PigContext.resolveClassName(
+                    comparatorFuncName);
     	}
 
     	return sortJob;

Modified: incubator/pig/trunk/src/org/apache/pig/impl/physicalLayer/POMapreduce.java
URL: http://svn.apache.org/viewvc/incubator/pig/trunk/src/org/apache/pig/impl/physicalLayer/POMapreduce.java?rev=611983&r1=611982&r2=611983&view=diff
==============================================================================
--- incubator/pig/trunk/src/org/apache/pig/impl/physicalLayer/POMapreduce.java (original)
+++ incubator/pig/trunk/src/org/apache/pig/impl/physicalLayer/POMapreduce.java Mon Jan 14
16:51:44 2008
@@ -165,15 +165,16 @@
 
     void print() {
         Logger log = PigLogger.getLogger();
-        log.debug("Input: " + inputFileSpecs);
-        log.debug("Map: " + toMap);
-        log.debug("Group: " + groupFuncs);
-        log.debug("Combine: " + toCombine);
-        log.debug("Reduce: " + toReduce);
-        log.debug("Output: " + outputFileSpec);
-        log.debug("Split: " + toSplit);
-        log.debug("Map parallelism: " + mapParallelism);
-        log.debug("Reduce parallelism: " + reduceParallelism);
+        log.info("----- MapReduce Job -----");
+        log.info("Input: " + inputFileSpecs);
+        log.info("Map: " + toMap);
+        log.info("Group: " + groupFuncs);
+        log.info("Combine: " + toCombine);
+        log.info("Reduce: " + toReduce);
+        log.info("Output: " + outputFileSpec);
+        log.info("Split: " + toSplit);
+        log.info("Map parallelism: " + mapParallelism);
+        log.info("Reduce parallelism: " + reduceParallelism);
     }
     
     public POMapreduce copy(){



Mime
View raw message