HADOOP-13921. Remove log4j classes from JobConf.
Signed-off-by: Akira Ajisaka <aajisaka@apache.org>
This commit is contained in:
parent
6e6e96583f
commit
f5517a8200
|
@ -96,7 +96,6 @@
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- Move log4j to optional, since it is needed for some pieces folks might not use:
|
<!-- Move log4j to optional, since it is needed for some pieces folks might not use:
|
||||||
* one of the three custom log4j appenders we have
|
* one of the three custom log4j appenders we have
|
||||||
* JobConf (?!) (so essentially any user of MapReduce)
|
|
||||||
-->
|
-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>log4j</groupId>
|
<groupId>log4j</groupId>
|
||||||
|
|
|
@ -650,12 +650,12 @@ public class MRApps extends Apps {
|
||||||
if (isMap) {
|
if (isMap) {
|
||||||
return conf.get(
|
return conf.get(
|
||||||
MRJobConfig.MAP_LOG_LEVEL,
|
MRJobConfig.MAP_LOG_LEVEL,
|
||||||
JobConf.DEFAULT_LOG_LEVEL.toString()
|
JobConf.DEFAULT_LOG_LEVEL
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return conf.get(
|
return conf.get(
|
||||||
MRJobConfig.REDUCE_LOG_LEVEL,
|
MRJobConfig.REDUCE_LOG_LEVEL,
|
||||||
JobConf.DEFAULT_LOG_LEVEL.toString()
|
JobConf.DEFAULT_LOG_LEVEL
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,7 +53,6 @@ import org.apache.hadoop.security.Credentials;
|
||||||
import org.apache.hadoop.util.ClassUtil;
|
import org.apache.hadoop.util.ClassUtil;
|
||||||
import org.apache.hadoop.util.ReflectionUtils;
|
import org.apache.hadoop.util.ReflectionUtils;
|
||||||
import org.apache.hadoop.util.Tool;
|
import org.apache.hadoop.util.Tool;
|
||||||
import org.apache.log4j.Level;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A map/reduce job configuration.
|
* A map/reduce job configuration.
|
||||||
|
@ -333,7 +332,7 @@ public class JobConf extends Configuration {
|
||||||
private Credentials credentials = new Credentials();
|
private Credentials credentials = new Credentials();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Configuration key to set the logging {@link Level} for the map task.
|
* Configuration key to set the logging level for the map task.
|
||||||
*
|
*
|
||||||
* The allowed logging levels are:
|
* The allowed logging levels are:
|
||||||
* OFF, FATAL, ERROR, WARN, INFO, DEBUG, TRACE and ALL.
|
* OFF, FATAL, ERROR, WARN, INFO, DEBUG, TRACE and ALL.
|
||||||
|
@ -342,7 +341,7 @@ public class JobConf extends Configuration {
|
||||||
JobContext.MAP_LOG_LEVEL;
|
JobContext.MAP_LOG_LEVEL;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Configuration key to set the logging {@link Level} for the reduce task.
|
* Configuration key to set the logging level for the reduce task.
|
||||||
*
|
*
|
||||||
* The allowed logging levels are:
|
* The allowed logging levels are:
|
||||||
* OFF, FATAL, ERROR, WARN, INFO, DEBUG, TRACE and ALL.
|
* OFF, FATAL, ERROR, WARN, INFO, DEBUG, TRACE and ALL.
|
||||||
|
@ -353,7 +352,7 @@ public class JobConf extends Configuration {
|
||||||
/**
|
/**
|
||||||
* Default logging level for map/reduce tasks.
|
* Default logging level for map/reduce tasks.
|
||||||
*/
|
*/
|
||||||
public static final Level DEFAULT_LOG_LEVEL = Level.INFO;
|
public static final String DEFAULT_LOG_LEVEL = JobContext.DEFAULT_LOG_LEVEL;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The variable is kept for M/R 1.x applications, M/R 2.x applications should
|
* The variable is kept for M/R 1.x applications, M/R 2.x applications should
|
||||||
|
|
Loading…
Reference in New Issue