Github user keith-turner commented on a diff in the pull request: https://github.com/apache/accumulo/pull/256#discussion_r115290117 --- Diff: core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/LruBlockCache.java --- @@ -84,7 +85,7 @@ static final int statThreadPeriod = 60; /** Concurrent map (the cache) */ - private final ConcurrentHashMap<String,CachedBlock> map; --- End diff -- It may be nice to keep the ability to have these final for performance reasons. I think we could do this if we made the BlockCacheFactory configurable instead of the BlockCache. For example if we had an interface like ```java public interface BlockCacheFactory { /** * TODO document how this can utilize the new arbitrary instance config */ public BlockCache getBlockCache(AccumuloConfiguration conf); } ``` If we had that then we could configure an LruBlockCacheFactory that actually calls the constructor, enabling us to keep using final. ```java public class LruBlockCacheFactory implement BlockCacheFactory { public BlockCache getBlockCache(AccumuloConfiguration conf) { //read whatever is needed from config in local vars return new LruBlockCache(localVar1, localVar2); } } ``` With this, the `start()` method would not be needed also. The `start()` method makes assumptions about the required config. Using the configurable factory makes no assumptions about the config needed.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---