hadoop-mapreduce-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hongyuan Li (JIRA)" <j...@apache.org>
Subject [jira] [Created] (MAPREDUCE-7186) JobSubmitter#checkSpecs doesn not judge whether reduceNums is less than zero.
Date Thu, 21 Feb 2019 09:12:00 GMT
Hongyuan Li created MAPREDUCE-7186:
--------------------------------------

             Summary: JobSubmitter#checkSpecs doesn not judge whether reduceNums is less than
zero.
                 Key: MAPREDUCE-7186
                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-7186
             Project: Hadoop Map/Reduce
          Issue Type: Bug
          Components: client
            Reporter: Hongyuan Li


JobSubmitter#checkSpecs doesn not judge whether reduceNums is less than zero.
{code:java}
private void checkSpecs(Job job) throws ClassNotFoundException,
	InterruptedException, IOException {
	JobConf jConf = (JobConf)job.getConfiguration();
	// Check the output specification
	if (jConf.getNumReduceTasks() == 0 ?
	jConf.getUseNewMapper() : jConf.getUseNewReducer()) {
	org.apache.hadoop.mapreduce.OutputFormat<?, ?> output =
	ReflectionUtils.newInstance(job.getOutputFormatClass(),
	job.getConfiguration());
	output.checkOutputSpecs(job);
	} else {
	jConf.getOutputFormat().checkOutputSpecs(jtFs, jConf);
	}
	}
	{code}
The code does handle the situation when reduceTaskNums is set to -1 or any other value less
than zero.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: mapreduce-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: mapreduce-dev-help@hadoop.apache.org


Mime
View raw message