|
@@ -153,6 +153,10 @@ import com.google.common.base.Preconditions;
|
|
|
* will be resolved to another property in this Configuration, while
|
|
|
* <tt>${<i>user.name</i>}</tt> would then ordinarily be resolved to the value
|
|
|
* 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
|
|
|
@InterfaceStability.Stable
|
|
@@ -161,6 +165,9 @@ public class Configuration implements Iterable<Map.Entry<String,String>>,
|
|
|
private static final Log LOG =
|
|
|
LogFactory.getLog(Configuration.class);
|
|
|
|
|
|
+ private static final Log LOG_DEPRECATION =
|
|
|
+ LogFactory.getLog("org.apache.hadoop.conf.Configuration.deprecation");
|
|
|
+
|
|
|
private boolean quietmode = true;
|
|
|
|
|
|
private static class Resource {
|
|
@@ -830,7 +837,7 @@ public class Configuration implements Iterable<Map.Entry<String,String>>,
|
|
|
private void warnOnceIfDeprecated(String name) {
|
|
|
DeprecatedKeyInfo keyInfo = deprecatedKeyMap.get(name);
|
|
|
if (keyInfo != null && !keyInfo.accessed) {
|
|
|
- LOG.warn(keyInfo.getWarningMessage(name));
|
|
|
+ LOG_DEPRECATION.info(keyInfo.getWarningMessage(name));
|
|
|
}
|
|
|
}
|
|
|
|