pc.getConf().setProperty("pig.exec.reducers.max", "10");
HExecutionEngine exe = pc.getExecutionEngine();
ConfigurationValidator.validatePigProperties(exe.getConfiguration());
Configuration conf = ConfigurationUtil.toConfiguration(exe.getConfiguration());
JobControlCompiler jcc = new JobControlCompiler(pc, conf);
JobControl jc=jcc.compile(mrPlan, "Test");
Job job = jc.getWaitingJobs().get(0);
long reducer=Math.min((long)Math.ceil(new File("test/org/apache/pig/test/data/passwd").length()/100.0), 10);
assertEquals(job.getJobConf().getLong("mapred.reduce.tasks",10), reducer);
// use the PARALLEL key word, it will override the estimated reducer number