This is an automated email from the ASF dual-hosted git repository. mmiller pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/master by this push: new 628336f Fixes deprecation warning. Closes #701 (#722) 628336f is described below commit 628336f8db4c155b9e8a070a16bf6863f79bf628 Author: Mike Miller <mmil...@apache.org> AuthorDate: Fri Oct 26 15:10:47 2018 -0400 Fixes deprecation warning. Closes #701 (#722) --- .../apache/accumulo/core/conf/AccumuloConfiguration.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/org/apache/accumulo/core/conf/AccumuloConfiguration.java b/core/src/main/java/org/apache/accumulo/core/conf/AccumuloConfiguration.java index cc658c0..8212f2c 100644 --- a/core/src/main/java/org/apache/accumulo/core/conf/AccumuloConfiguration.java +++ b/core/src/main/java/org/apache/accumulo/core/conf/AccumuloConfiguration.java @@ -390,6 +390,9 @@ public abstract class AccumuloConfiguration implements Iterable<Entry<String,Str throw new UnsupportedOperationException(); } + // deprecation property warning could get spammy in tserver so only warn once + boolean depPropWarned = false; + @SuppressWarnings("deprecation") Integer getDeprecatedScanThreads(String name) { @@ -407,10 +410,14 @@ public abstract class AccumuloConfiguration implements Iterable<Entry<String,Str } if (!isPropertySet(prop) && isPropertySet(deprecatedProp)) { - log.warn("Property {} is deprecated, use {} instead.", prop.getKey(), - deprecatedProp.getKey()); + if (!depPropWarned) { + depPropWarned = true; + log.warn("Property {} is deprecated, use {} instead.", deprecatedProp.getKey(), + prop.getKey()); + } return Integer.valueOf(get(deprecatedProp)); - } else if (isPropertySet(prop) && isPropertySet(deprecatedProp)) { + } else if (isPropertySet(prop) && isPropertySet(deprecatedProp) && !depPropWarned) { + depPropWarned = true; log.warn("Deprecated property {} ignored because {} is set", deprecatedProp.getKey(), prop.getKey()); }