accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From keith-turner <...@git.apache.org>
Subject [GitHub] accumulo pull request #256: ACCUMULO-4463: Make block cache implementation c...
Date Fri, 12 May 2017 15:37:05 GMT
Github user keith-turner commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/256#discussion_r116260368
  
    --- Diff: core/src/main/java/org/apache/accumulo/core/client/rfile/RFileScanner.java ---
    @@ -135,16 +142,41 @@ public long requestCount() {
         }
     
         this.opts = opts;
    -    if (opts.indexCacheSize > 0) {
    -      this.indexCache = new LruBlockCache(opts.indexCacheSize, CACHE_BLOCK_SIZE);
    -    } else {
    -      this.indexCache = new NoopCache();
    -    }
     
    -    if (opts.dataCacheSize > 0) {
    -      this.dataCache = new LruBlockCache(opts.dataCacheSize, CACHE_BLOCK_SIZE);
    -    } else {
    -      this.dataCache = new NoopCache();
    +    if (opts.indexCacheSize > 0 || opts.dataCacheSize > 0) {
    +      ConfigurationCopy cc = new ConfigurationCopy();
    +      cc.set(Property.TSERV_CACHE_FACTORY_IMPL, LruBlockCacheFactory.class.getName());
    +      try {
    +        factory = BlockCacheFactory.getInstance(cc);
    --- End diff --
    
    For iterators loaded client side, it looks like Class.forName is used.
    
    https://github.com/apache/accumulo/blob/f81a8ec7410e789d11941351d5899b8894c6a322/core/src/main/java/org/apache/accumulo/core/iterators/IteratorUtil.java#L299


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

Mime
View raw message