HADOOP-9487 Deprecation warnings in Configuration should go to their own log or otherwise be suppressible
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1515672 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ffdedf6b8b
commit
172d0cef69
|
@ -322,6 +322,9 @@ Release 2.3.0 - UNRELEASED
|
||||||
HADOOP-9866. convert hadoop-auth testcases requiring kerberos to
|
HADOOP-9866. convert hadoop-auth testcases requiring kerberos to
|
||||||
use minikdc. (ywskycn via tucu)
|
use minikdc. (ywskycn via tucu)
|
||||||
|
|
||||||
|
HADOOP-9487 Deprecation warnings in Configuration should go to their
|
||||||
|
own log or otherwise be suppressible (Chu Tong via stevel)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
HADOOP-9748. Reduce blocking on UGI.ensureInitialized (daryn)
|
HADOOP-9748. Reduce blocking on UGI.ensureInitialized (daryn)
|
||||||
|
|
|
@ -130,6 +130,13 @@ log4j.appender.DRFAS.layout=org.apache.log4j.PatternLayout
|
||||||
log4j.appender.DRFAS.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n
|
log4j.appender.DRFAS.layout.ConversionPattern=%d{ISO8601} %p %c: %m%n
|
||||||
log4j.appender.DRFAS.DatePattern=.yyyy-MM-dd
|
log4j.appender.DRFAS.DatePattern=.yyyy-MM-dd
|
||||||
|
|
||||||
|
#
|
||||||
|
# hadoop configuration logging
|
||||||
|
#
|
||||||
|
|
||||||
|
# Uncomment the following line to turn off configuration deprecation warnings.
|
||||||
|
# log4j.logger.org.apache.hadoop.conf.Configuration.deprecation=WARN
|
||||||
|
|
||||||
#
|
#
|
||||||
# hdfs audit logging
|
# hdfs audit logging
|
||||||
#
|
#
|
||||||
|
@ -232,3 +239,4 @@ log4j.appender.RMSUMMARY.layout.ConversionPattern=%d{ISO8601} %p %c{2}: %m%n
|
||||||
#log4j.appender.HSAUDIT.layout=org.apache.log4j.PatternLayout
|
#log4j.appender.HSAUDIT.layout=org.apache.log4j.PatternLayout
|
||||||
#log4j.appender.HSAUDIT.layout.ConversionPattern=%d{ISO8601} %p %c{2}: %m%n
|
#log4j.appender.HSAUDIT.layout.ConversionPattern=%d{ISO8601} %p %c{2}: %m%n
|
||||||
#log4j.appender.HSAUDIT.DatePattern=.yyyy-MM-dd
|
#log4j.appender.HSAUDIT.DatePattern=.yyyy-MM-dd
|
||||||
|
|
||||||
|
|
|
@ -153,6 +153,10 @@ import com.google.common.base.Preconditions;
|
||||||
* will be resolved to another property in this Configuration, while
|
* will be resolved to another property in this Configuration, while
|
||||||
* <tt>${<i>user.name</i>}</tt> would then ordinarily be resolved to the value
|
* <tt>${<i>user.name</i>}</tt> would then ordinarily be resolved to the value
|
||||||
* of the System property with that name.
|
* of the System property with that name.
|
||||||
|
* By default, warnings will be given to any deprecated configuration
|
||||||
|
* parameters and these are suppressible by configuring
|
||||||
|
* <tt>log4j.logger.org.apache.hadoop.conf.Configuration.deprecation</tt> in
|
||||||
|
* log4j.properties file.
|
||||||
*/
|
*/
|
||||||
@InterfaceAudience.Public
|
@InterfaceAudience.Public
|
||||||
@InterfaceStability.Stable
|
@InterfaceStability.Stable
|
||||||
|
@ -161,6 +165,9 @@ public class Configuration implements Iterable<Map.Entry<String,String>>,
|
||||||
private static final Log LOG =
|
private static final Log LOG =
|
||||||
LogFactory.getLog(Configuration.class);
|
LogFactory.getLog(Configuration.class);
|
||||||
|
|
||||||
|
private static final Log LOG_DEPRECATION =
|
||||||
|
LogFactory.getLog("org.apache.hadoop.conf.Configuration.deprecation");
|
||||||
|
|
||||||
private boolean quietmode = true;
|
private boolean quietmode = true;
|
||||||
|
|
||||||
private static class Resource {
|
private static class Resource {
|
||||||
|
@ -836,7 +843,7 @@ public class Configuration implements Iterable<Map.Entry<String,String>>,
|
||||||
private void warnOnceIfDeprecated(String name) {
|
private void warnOnceIfDeprecated(String name) {
|
||||||
DeprecatedKeyInfo keyInfo = deprecatedKeyMap.get(name);
|
DeprecatedKeyInfo keyInfo = deprecatedKeyMap.get(name);
|
||||||
if (keyInfo != null && !keyInfo.accessed) {
|
if (keyInfo != null && !keyInfo.accessed) {
|
||||||
LOG.warn(keyInfo.getWarningMessage(name));
|
LOG_DEPRECATION.info(keyInfo.getWarningMessage(name));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue