accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From keith-turner <>
Subject [GitHub] accumulo pull request #256: ACCUMULO-4463: Make block cache implentation con...
Date Mon, 08 May 2017 16:38:02 GMT
Github user keith-turner commented on a diff in the pull request:
    --- Diff: core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/
    @@ -84,7 +85,7 @@
       static final int statThreadPeriod = 60;
       /** Concurrent map (the cache) */
    -  private final ConcurrentHashMap<String,CachedBlock> map;
    --- End diff --
    One more thought.. may want to have an enum cache type.
    enum CacheType {
    Then the factory could key use this.
    public interface BlockCacheFactory {
       * TODO document how this can utilize the new arbitrary instance config
      public BlockCache getBlockCache(CacheType ct, AccumuloConfiguration conf);
    Then the implementation could use this for differentiated config.
    public class SuperDuperBlockCacheFactory implement BlockCacheFactory {
       public BlockCache getBlockCache(CacheType ct, AccumuloConfiguration conf) {
           long knob42 = conf.getMemory("general.custom."".knob42");
            //read whatever is needed from config in local vars
            return new SuperDuperBlockCacheFactory(knob42);

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 or file a JIRA ticket
with INFRA.

View raw message