You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pig.apache.org by ga...@apache.org on 2009/03/05 02:13:53 UTC
svn commit: r750271 - in /hadoop/pig/trunk: CHANGES.txt
src/org/apache/pig/Main.java
Author: gates
Date: Thu Mar 5 01:13:52 2009
New Revision: 750271
URL: http://svn.apache.org/viewvc?rev=750271&view=rev
Log:
PIG-692 When running a job from a script, use that script name as the default job name.
Modified:
hadoop/pig/trunk/CHANGES.txt
hadoop/pig/trunk/src/org/apache/pig/Main.java
Modified: hadoop/pig/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/pig/trunk/CHANGES.txt?rev=750271&r1=750270&r2=750271&view=diff
==============================================================================
--- hadoop/pig/trunk/CHANGES.txt (original)
+++ hadoop/pig/trunk/CHANGES.txt Thu Mar 5 01:13:52 2009
@@ -10,6 +10,9 @@
PIG-620: Added MaxTupleBy1stField UDF to piggybank (vzaliva via gates)
+ PIG-692: When running a job from a script, use the name of that script as
+ the default name for the job (vzaliva via gates)
+
OPTIMIZATIONS
BUG FIXES
Modified: hadoop/pig/trunk/src/org/apache/pig/Main.java
URL: http://svn.apache.org/viewvc/hadoop/pig/trunk/src/org/apache/pig/Main.java?rev=750271&r1=750270&r2=750271&view=diff
==============================================================================
--- hadoop/pig/trunk/src/org/apache/pig/Main.java (original)
+++ hadoop/pig/trunk/src/org/apache/pig/Main.java Thu Mar 5 01:13:52 2009
@@ -264,6 +264,11 @@
logFileName = validateLogFile(logFileName, file);
pigContext.getProperties().setProperty("pig.logfile", logFileName);
+
+ // Set job name based on name of the script
+ pigContext.getProperties().setProperty(PigContext.JOB_NAME,
+ "PigLatin:" +new File(file).getName()
+ );
if (!debug)
new File(substFile).deleteOnExit();
@@ -339,6 +344,11 @@
if (!debug)
new File(substFile).deleteOnExit();
+ // Set job name based on name of the script
+ pigContext.getProperties().setProperty(PigContext.JOB_NAME,
+ "PigLatin:" +new File(remainders[0]).getName()
+ );
+
grunt = new Grunt(pin, pigContext);
gruntCalled = true;
grunt.exec();