keith-turner commented on a change in pull request #1873:
URL: https://github.com/apache/accumulo/pull/1873#discussion_r563770531
##########
File path:
server/base/src/main/java/org/apache/accumulo/server/util/SystemPropUtil.java
##########
@@ -70,6 +81,20 @@ public static void setSystemProperty(ServerContext context,
String property, Str
public static void removeSystemProperty(ServerContext context, String
property)
throws InterruptedException, KeeperException {
+ AtomicBoolean shouldRemove = new AtomicBoolean(true);
+ DeprecatedPropertyUtil.getReplacementName(property, (log, replacement) -> {
+ log.warn("{} was deprecated and will be removed in a future release;"
+ + " no action was taken because it is not set here;"
+ + " did you mean to remove its replacment {} instead?", property,
replacement);
+ shouldRemove.set(false);
+ });
+ if (shouldRemove.get()) {
+ removePropWithoutDeprecationWarning(context, property);
+ }
Review comment:
I think we can very reliably infer user intent for code like the
following written against past versions of Accumulo.
```java
client.instanceOperations().removeProperty("master.status.threadpool.size");
client.instanceOperations().setProperty("master.fate.threadpool.size","9");
```
As for judging intent of code that will be written in the future against
2.1, that code will be written with knowledge of how manager and master
properties work in 2.1. Users can write new code based on this understanding,
giving them the opportunity to write code that is correct based on how Accumulo
2.1 actually works.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]