You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "keith-turner (via GitHub)" <gi...@apache.org> on 2023/12/04 22:08:15 UTC

Re: [PR] Move code from Manager class to compaction coordinator [accumulo]

keith-turner commented on code in PR #4011:
URL: https://github.com/apache/accumulo/pull/4011#discussion_r1414565040


##########
server/manager/src/main/java/org/apache/accumulo/manager/Manager.java:
##########
@@ -932,25 +929,21 @@ public void run() {
     final ServerContext context = getContext();
     final String zroot = getZooKeeperRoot();
 
-    this.compactionJobQueues = new CompactionJobQueues(
-        getConfiguration().getCount(Property.MANAGER_COMPACTION_SERVICE_PRIORITY_QUEUE_SIZE));
-
     // ACCUMULO-4424 Put up the Thrift servers before getting the lock as a sign of process health
     // when a hot-standby
     //
     // Start the Manager's Fate Service
     fateServiceHandler = new FateServiceHandler(this);
     managerClientHandler = new ManagerClientServiceHandler(this);
-    compactionCoordinator =
-        new CompactionCoordinator(context, tserverSet, security, compactionJobQueues, nextEvent);
+    compactionCoordinator = new CompactionCoordinatorImpl(context, tserverSet, security, nextEvent);

Review Comment:
   >  If the goal here is to decouple everything into services than maybe we should go ahead and use ServiceLoader and make things like CompactionCoordinator pluggable in some way. 
   
   I did not have a goal of being able to swap out the impls at runtime.  I was more trying to wrangle the code into something that is easier to maintain.  The manager has distinct functionality, but some of the manager code is not well aligned with the functionality.  I thought the interfaces would help re align the code with the functionality by making dependencies between these functional service in the manager explicit in the code via using interfaces.  
   
   As a secondary bonus, I thought this reorg may help make the code more testable.  However for the testing I was thinking of doing it would still be compile time switching of impls and not run time.



-- 
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: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org