keith-turner commented on code in PR #5537:
URL: https://github.com/apache/accumulo/pull/5537#discussion_r2162314749
##########
server/manager/src/main/java/org/apache/accumulo/manager/Manager.java:
##########
@@ -580,7 +559,7 @@ public void run() {
}
}
- private boolean shouldCleanupMigration(TabletMetadata tabletMetadata) {
+ boolean shouldCleanupMigration(TabletMetadata tabletMetadata) {
Review Comment:
Made that change in d2e2de66505cde85ed6215e7f82e239bc80db2bb. That pulled a
lot more code out of the manager which is nice. To make the change I added a
new `BalancerManager.upgradeComplete()` method that starts the clean up thread.
Did this because the current code started the thread after upgrade was
complete.
Not something for this PR, but that made me wonder if the manger could be
kinda like maven where it has a set of lifecycle events that it walks all of
its sub components through. Maybe that would cleanup the manager code, not
sure. Then the balancer manager, compaction coordinator, fate, etc could have
a method like the following that the manager calls.
```java
public void startingCycle(ManagerLifeCycle cycle){
swtich(cycle){
case UPGRADE_ZOOKEPER:
case SAFE_MODE:
// do nothing
break;
case NORMAL:
// start cleanup thread
break;
}
}
```
This would be beneficial if it could pull coordination code out of the
Manager class and into the sub component classes. ManagerLifeCycle would
probably be a combination of a few exsiting enums in the manger plus anything
else that is needed.
--
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]