5
0
mirror of https://github.com/apache/sqoop.git synced 2025-05-03 22:02:31 +08:00

SQOOP-1002: Sqoop2: Mapreduce local mode detection is not working correctly on Hadoop 2.x

(Jarek Jarcec Cecho via Kate Ting)
This commit is contained in:
Kate Ting 2013-05-11 21:22:20 -04:00
parent a52993a934
commit b1fcbc9d93

View File

@ -424,6 +424,12 @@ private Counters convertMapreduceCounters(org.apache.hadoop.mapred.Counters hado
* @return True if we're running in local mode
*/
private boolean isLocal() {
// If framework is set to YARN, then we can't be running in local mode
if("yarn".equals(globalConfiguration.get("mapreduce.framework.name"))) {
return false;
}
// If job tracker address is "local" then we're running in local mode
return "local".equals(globalConfiguration.get("mapreduce.jobtracker.address"))
|| "local".equals(globalConfiguration.get("mapred.job.tracker"));
}