ddanielr commented on code in PR #3915:
URL: https://github.com/apache/accumulo/pull/3915#discussion_r1391400465
##########
core/src/main/java/org/apache/accumulo/core/util/compaction/CompactionServicesConfig.java:
##########
@@ -50,16 +50,32 @@ private long getDefaultThroughput() {
.getMemoryAsBytes(Property.TSERV_COMPACTION_SERVICE_DEFAULT_RATE_LIMIT.getDefaultValue());
}
+ @SuppressWarnings("deprecation")
private Map<String,String> getConfiguration(AccumuloConfiguration aconf) {
- return
aconf.getAllPropertiesWithPrefix(Property.TSERV_COMPACTION_SERVICE_PREFIX);
+ Map<String,String> properties = new HashMap<>();
+
properties.putAll(aconf.getAllPropertiesWithPrefix(Property.TSERV_COMPACTION_SERVICE_PREFIX));
+
properties.putAll(aconf.getAllPropertiesWithPrefix(Property.COMPACTION_SERVICE_PREFIX));
+ // Return unmodifiable map
+ return Map.copyOf(properties);
}
+ @SuppressWarnings("deprecation")
public CompactionServicesConfig(AccumuloConfiguration aconf) {
Map<String,String> configs = getConfiguration(aconf);
+ String oldPrefix = Property.TSERV_COMPACTION_SERVICE_PREFIX.getKey();
+ String newPrefix = Property.COMPACTION_SERVICE_PREFIX.getKey();
Review Comment:
Added behavior to check which prefix is used by the planner definition and
then allow old properties to be set with logged statement and new properties
can be defined with no logging messages.
--
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]