You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pig.apache.org by da...@apache.org on 2011/01/11 20:34:58 UTC
svn commit: r1057822 - in /pig/branches/branch-0.8: CHANGES.txt
src/org/apache/pig/Main.java src/org/apache/pig/PigServer.java
Author: daijy
Date: Tue Jan 11 19:34:57 2011
New Revision: 1057822
URL: http://svn.apache.org/viewvc?rev=1057822&view=rev
Log:
PIG-1791: System property mapred.output.compress, but pig-cluster-hadoop-site.xml doesn't
Modified:
pig/branches/branch-0.8/CHANGES.txt
pig/branches/branch-0.8/src/org/apache/pig/Main.java
pig/branches/branch-0.8/src/org/apache/pig/PigServer.java
Modified: pig/branches/branch-0.8/CHANGES.txt
URL: http://svn.apache.org/viewvc/pig/branches/branch-0.8/CHANGES.txt?rev=1057822&r1=1057821&r2=1057822&view=diff
==============================================================================
--- pig/branches/branch-0.8/CHANGES.txt (original)
+++ pig/branches/branch-0.8/CHANGES.txt Tue Jan 11 19:34:57 2011
@@ -211,6 +211,8 @@ PIG-1309: Map-side Cogroup (ashutoshc)
BUG FIXES
+PIG-1791: System property mapred.output.compress, but pig-cluster-hadoop-site.xml doesn't (daijy)
+
PIG-1771: New logical plan: Merge schema fail if LoadFunc.getSchema return different schema with "Load...AS" (daijy)
PIG-1766: New logical plan: ImplicitSplitInserter should before DuplicateForEachColumnRewrite (daijy)
Modified: pig/branches/branch-0.8/src/org/apache/pig/Main.java
URL: http://svn.apache.org/viewvc/pig/branches/branch-0.8/src/org/apache/pig/Main.java?rev=1057822&r1=1057821&r2=1057822&view=diff
==============================================================================
--- pig/branches/branch-0.8/src/org/apache/pig/Main.java (original)
+++ pig/branches/branch-0.8/src/org/apache/pig/Main.java Tue Jan 11 19:34:57 2011
@@ -180,16 +180,6 @@ static int run(String args[], PigProgres
properties.setProperty("stop.on.failure", ""+false);
}
- if( "true".equals( properties.getProperty( "mapred.output.compress" ) ) ) {
- properties.setProperty( "output.compression.enabled", "true" );
- String codec = properties.getProperty( "mapred.output.compression.codec" );
- if( codec == null ) {
- throw new RuntimeException( "'mapred.output.compress' is set but no value is specified for 'mapred.output.compression.codec'." );
- } else {
- properties.setProperty( "output.compression.codec", codec );
- }
- }
-
// set up client side system properties in UDF context
UDFContext.getUDFContext().setClientSystemProps();
Modified: pig/branches/branch-0.8/src/org/apache/pig/PigServer.java
URL: http://svn.apache.org/viewvc/pig/branches/branch-0.8/src/org/apache/pig/PigServer.java?rev=1057822&r1=1057821&r2=1057822&view=diff
==============================================================================
--- pig/branches/branch-0.8/src/org/apache/pig/PigServer.java (original)
+++ pig/branches/branch-0.8/src/org/apache/pig/PigServer.java Tue Jan 11 19:34:57 2011
@@ -225,6 +225,16 @@ public class PigServer {
pigContext.connect();
}
+ if( "true".equals( pigContext.getProperties().getProperty( "mapred.output.compress" ) ) ) {
+ pigContext.getProperties().setProperty( "output.compression.enabled", "true" );
+ String codec = pigContext.getProperties().getProperty( "mapred.output.compression.codec" );
+ if( codec == null ) {
+ throw new RuntimeException( "'mapred.output.compress' is set but no value is specified for 'mapred.output.compression.codec'." );
+ } else {
+ pigContext.getProperties().setProperty( "output.compression.codec", codec );
+ }
+ }
+
addJarsFromProperties();
}