You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pig.apache.org by ha...@apache.org on 2010/02/01 20:19:22 UTC
svn commit: r905377 - in /hadoop/pig/trunk: CHANGES.txt
src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/JobControlCompiler.java
Author: hashutosh
Date: Mon Feb 1 19:19:22 2010
New Revision: 905377
URL: http://svn.apache.org/viewvc?rev=905377&view=rev
Log:
PIG-1124: Unable to set Custom Job Name using the -Dmapred.job.name parameter
Modified:
hadoop/pig/trunk/CHANGES.txt
hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/JobControlCompiler.java
Modified: hadoop/pig/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/pig/trunk/CHANGES.txt?rev=905377&r1=905376&r2=905377&view=diff
==============================================================================
--- hadoop/pig/trunk/CHANGES.txt (original)
+++ hadoop/pig/trunk/CHANGES.txt Mon Feb 1 19:19:22 2010
@@ -80,6 +80,8 @@
BUG FIXES
+PIG-1124: Unable to set Custom Job Name using the -Dmapred.job.name parameter (ashutoshc)
+
PIG-1213: Schema serialization is broken (pradeepkth)
PIG-1194: ERROR 2055: Received Error while processing the map plan (rding via ashutoshc)
Modified: hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/JobControlCompiler.java
URL: http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/JobControlCompiler.java?rev=905377&r1=905376&r2=905377&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/JobControlCompiler.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/JobControlCompiler.java Mon Feb 1 19:19:22 2010
@@ -373,8 +373,12 @@
jobConf.set("pig.pigContext", ObjectSerializer.serialize(pigContext));
jobConf.set("udf.import.list", ObjectSerializer.serialize(PigContext.getPackageImportList()));
// this is for unit tests since some don't create PigServer
- if (pigContext.getProperties().getProperty(PigContext.JOB_NAME) != null)
- jobConf.setJobName(pigContext.getProperties().getProperty(PigContext.JOB_NAME));
+
+ // if user specified the job name using -D switch, Pig won't reset the name then.
+ if (System.getProperty("mapred.job.name") == null &&
+ pigContext.getProperties().getProperty(PigContext.JOB_NAME) != null){
+ jobConf.setJobName(pigContext.getProperties().getProperty(PigContext.JOB_NAME));
+ }
if (pigContext.getProperties().getProperty(PigContext.JOB_PRIORITY) != null) {
// If the job priority was set, attempt to get the corresponding enum value