apache/accumulo

Code to periodically clean up empty tserver nodes in ZK may need to be generlized

Closed this issue · 2 comments

The Accumulo manager periodically calls LiveTserverSet.scanServers() which will delete any tservers nodes in ZK that have no locks among other things. The functionality of periodically cleaning up empty ZK nodes could also be done for compactors and scan servers (not sure if code can be shared for this). Is there similar code that cleans up scan server and compactor entries in ZK? If not, then need to create it. If there is then this issue can be closed.

This potential problem in exists elasticity, but its probably a need in earlier versions as well. The following are a few links to code that do this clean up.

tserverSet.startListeningForTabletServerChanges();

.scheduleWithFixedDelay(this::scanServers, 0, 5000, TimeUnit.MILLISECONDS));

Found this code that cleans up compactors. Have not found anything for scan servers yet.

For scan servers, looked at what used the constant Constants.ZSSERVERS and did not see any cleanup code directly referenced from that.