ddanielr commented on code in PR #4092:
URL: https://github.com/apache/accumulo/pull/4092#discussion_r1433281065
##########
core/src/main/java/org/apache/accumulo/core/spi/compaction/DefaultCompactionPlanner.java:
##########
@@ -212,16 +212,16 @@ public void init(InitParameters params) {
@SuppressWarnings("removal")
private void determineMaxFilesToCompact(InitParameters params) {
- String fqo = params.getFullyQualifiedOption("maxOpen");
- if (!params.getServiceEnvironment().getConfiguration().isSet(fqo)
- && params.getServiceEnvironment().getConfiguration()
- .isSet(Property.TSERV_MAJC_THREAD_MAXOPEN.getKey())) {
+ String maxOpen = params.getOptions().get("maxOpen");
+ if (maxOpen == null && params.getServiceEnvironment().getConfiguration()
+ .isSet(Property.TSERV_MAJC_THREAD_MAXOPEN.getKey())) {
log.warn("The property " + Property.TSERV_MAJC_THREAD_MAXOPEN.getKey()
- + " was set, it is deprecated. Set the " + fqo + " option
instead.");
+ + " was set, it is deprecated. Set the " +
params.getFullyQualifiedOption("maxOpen")
Review Comment:
We only have to check if the deprecated property is set when no valid
planner option exists.
The `maxOpen` property is already parsed out by the CompactionServicesConfig
class and included in the DefaultCompactionPlanner's options.
The only time the "fully qualified" method should be used is when informing
the user to update a specific property in their config.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]