Prevent multiple creation of multiple PropStore instances.
As a follow-on to single node property storage in ZooKeeper (issue https://github.com/apache/accumulo/issues/1454)
Currently ZooPropStore exposes the cache builder to facilitate testing. It may be possible that future code could create multiple ZooPropStores instead of sharing a common instance. (The code would work, just be using unnecessary resources)
As a follow-on, the builder could be made private or better protected if tests extended / override the builder to expose the builder for mock injection.
While working on adding version check refresh it looks like we are creating multiple server contexts so this has a higher priority and will look at this next.
I don't think this is a problem, as long as the PropStore in the ServerContext is lazily initialized, which can be done by Suppliers.memoize, like other fields in ServerContext. I also noticed a related issue: we're creating two SystemConfiguration objects... one is created by ServerConfigurationFactory, and another is directly created in ServerContext. The latter should be removed, so only ServerConfigurationFactory is responsible for creating it. I don't know if there's any chicken-egg problems that this was trying to workaround, but if all the ITs pass, I would expect this to not be a problem getting rid of the latter one.
Addressed in PR #2781
@EdColeman Can this be closed?