ctubbsii commented on a change in pull request #1572: Refactor use of 
ServerConfigurationFactory
URL: https://github.com/apache/accumulo/pull/1572#discussion_r399024390
 
 

 ##########
 File path: 
server/base/src/main/java/org/apache/accumulo/server/tabletserver/LargestFirstMemoryManager.java
 ##########
 @@ -121,18 +122,16 @@ public void remove(Long key) {
     }
   }
 
-  LargestFirstMemoryManager(long maxMemory, int maxConcurrentMincs, int 
numWaitingMultiplier) {
-    this();
-    this.maxMemory = maxMemory;
-    this.maxConcurrentMincs = maxConcurrentMincs;
-    this.numWaitingMultiplier = numWaitingMultiplier;
+  @Override
+  public void init(ServerConfiguration conf) {
+    throw new IllegalStateException("Deprecated method, no longer should be 
used.");
 
 Review comment:
   Rather than override it or call the other method (which won't do anything, 
since we never call the deprecated one in the tserver), you could make it a 
deprecated default method in the interface that throws the exception. The 
exception message, as well as the deprecation message can say that it is 
scheduled for removal in 3.0.0. Since default methods don't need to be 
overridden, people can safely delete their current implementation to prepare 
for its eventual removal.
   
   However, I'm not sure the replacement accepting a ServerContext is any 
safer. It's still a leak of an internal type (ServerContext) that is subject to 
change, into what is effectively SPI. We should probably have some other 
specific MemoryManagerEnvironment type for this.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to