ddanielr commented on code in PR #3915:
URL: https://github.com/apache/accumulo/pull/3915#discussion_r1399791296


##########
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:
   After discussion with @keith-turner, the new property examples were removed 
so that property collision did not occur. 
   
   The new property behavior is as follows: 
   
   1. If a compaction service property is set via the default configuration, 
and it uses the old prefix, then the property will be used and no log messages 
will be generated. 
   
   2. If compaction service properties are set by the user, and all properties 
for that service use the old prefix, then the properties will be used and a 
warning message will be logged, informing the user to update the property to 
the new prefix.
   
   3. If a single compaction service property is set using the new prefix, then 
all properties for that service must use the new prefix. Compaction service 
properties using the old prefix will be dropped and a warning message will be 
logged. 
   
   4. If all properties for a compaction service use the new prefix, then 
nothing is logged and the compaction service properties are used.
   



-- 
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]

Reply via email to