Author: olga Date: Sat Sep 27 09:57:06 2008 New Revision: 699684 URL: http://svn.apache.org/viewvc?rev=699684&view=rev Log: fix to make unit tests ran again
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=699684&r1=699683&r2=699684&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 Sat Sep 27 09:57:06 2008 @@ -264,7 +264,9 @@ jobConf.set("pig.inputs", ObjectSerializer.serialize(inp)); jobConf.set("pig.inpTargets", ObjectSerializer.serialize(inpTargets)); jobConf.set("pig.pigContext", ObjectSerializer.serialize(pigContext)); - jobConf.setJobName(pigContext.getProperties().getProperty(PigContext.JOB_NAME)); + // 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)); // Setup the DistributedCache for this job setupDistributedCache(pigContext, jobConf, pigContext.getProperties(),