You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2018/10/26 19:10:49 UTC
[GitHub] milleruntime closed pull request #722: Fixes deprecation warning.
Closes #701
milleruntime closed pull request #722: Fixes deprecation warning. Closes #701
URL: https://github.com/apache/accumulo/pull/722
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
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 cc658c0fe2..8212f2c4eb 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 boolean isPropertySet(Property prop) {
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 @@ Integer getDeprecatedScanThreads(String name) {
}
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());
}
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services