accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dlmar...@apache.org
Subject [1/4] accumulo git commit: ACCUMULO-4463: misc improvements
Date Fri, 19 May 2017 17:17:25 GMT
Repository: accumulo
Updated Branches:
  refs/heads/IGNITE c4a18a63e -> 7b5aaeeaf


ACCUMULO-4463: misc improvements


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/e6d019e3
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/e6d019e3
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/e6d019e3

Branch: refs/heads/IGNITE
Commit: e6d019e3a60222affe4d5879d0f53d3a657715e6
Parents: e8ccddd
Author: Keith Turner <kturner@apache.org>
Authored: Thu May 18 23:49:25 2017 -0400
Committer: Keith Turner <kturner@apache.org>
Committed: Fri May 19 12:52:13 2017 -0400

----------------------------------------------------------------------
 .../core/client/rfile/RFileScanner.java         | 22 +++++++++---------
 .../org/apache/accumulo/core/conf/Property.java |  2 +-
 .../core/file/blockfile/cache/BlockCache.java   |  5 ++++
 .../cache/BlockCacheConfiguration.java          | 18 ++++++++++++---
 .../file/blockfile/cache/BlockCacheManager.java |  6 ++---
 .../file/blockfile/cache/lru/LruBlockCache.java |  5 ++++
 .../cache/tinylfu/TinyLfuBlockCache.java        |  5 ++++
 .../accumulo/core/summary/SummaryReader.java    |  4 ++++
 .../blockfile/cache/BlockCacheFactoryTest.java  |  4 ++--
 .../file/blockfile/cache/TestLruBlockCache.java | 24 +++++++++++++-------
 .../accumulo/core/file/rfile/RFileTest.java     |  2 +-
 .../tserver/TabletServerResourceManager.java    |  7 +++---
 12 files changed, 71 insertions(+), 33 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/e6d019e3/core/src/main/java/org/apache/accumulo/core/client/rfile/RFileScanner.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/rfile/RFileScanner.java b/core/src/main/java/org/apache/accumulo/core/client/rfile/RFileScanner.java
index 205e3ea..888bc7f 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/rfile/RFileScanner.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/rfile/RFileScanner.java
@@ -76,8 +76,6 @@ class RFileScanner extends ScannerOptions implements Scanner {
   private int batchSize = 1000;
   private long readaheadThreshold = 3;
 
-  private static final long CACHE_BLOCK_SIZE = AccumuloConfiguration.getDefaultConfiguration().getAsBytes(Property.TSERV_DEFAULT_BLOCKSIZE);
-
   static class Opts {
     InputArgs in;
     Authorizations auths = Authorizations.EMPTY;
@@ -112,6 +110,11 @@ class RFileScanner extends ScannerOptions implements Scanner {
     }
 
     @Override
+    public long getMaxHeapSize() {
+      return getMaxSize();
+    }
+
+    @Override
     public long getMaxSize() {
       return Integer.MAX_VALUE;
     }
@@ -130,7 +133,6 @@ class RFileScanner extends ScannerOptions implements Scanner {
         }
       };
     }
-
   }
 
   RFileScanner(Opts opts) {
@@ -141,15 +143,11 @@ class RFileScanner extends ScannerOptions implements Scanner {
     this.opts = opts;
 
     if (opts.indexCacheSize > 0 || opts.dataCacheSize > 0) {
-      ConfigurationCopy cc = null;
+      ConfigurationCopy cc = new ConfigurationCopy(DefaultConfiguration.getInstance());
       if (null != opts.tableConfig) {
-        cc = new ConfigurationCopy(opts.tableConfig);
-      } else {
-        cc = new ConfigurationCopy(new DefaultConfiguration());
-      }
-      if (null == cc.get(Property.TSERV_DEFAULT_BLOCKSIZE)) {
-        cc.set(Property.TSERV_DEFAULT_BLOCKSIZE, Long.toString(CACHE_BLOCK_SIZE));
+        opts.tableConfig.forEach(cc::set);
       }
+
       try {
         blockCacheManager = BlockCacheManager.getClientInstance(cc);
         if (opts.indexCacheSize > 0) {
@@ -161,8 +159,10 @@ class RFileScanner extends ScannerOptions implements Scanner {
         blockCacheManager.start(cc);
         this.indexCache = blockCacheManager.getBlockCache(CacheType.INDEX);
         this.dataCache = blockCacheManager.getBlockCache(CacheType.DATA);
+      } catch (RuntimeException e) {
+        throw e;
       } catch (Exception e) {
-        // FIXME: How do we report an error back to the user?
+        throw new RuntimeException(e);
       }
     }
     if (null == indexCache) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e6d019e3/core/src/main/java/org/apache/accumulo/core/conf/Property.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/conf/Property.java b/core/src/main/java/org/apache/accumulo/core/conf/Property.java
index 3547fac..a506e07 100644
--- a/core/src/main/java/org/apache/accumulo/core/conf/Property.java
+++ b/core/src/main/java/org/apache/accumulo/core/conf/Property.java
@@ -245,7 +245,7 @@ public enum Property {
   TSERV_PREFIX("tserver.", null, PropertyType.PREFIX, "Properties in this category affect
the behavior of the tablet servers"),
   TSERV_CLIENT_TIMEOUT("tserver.client.timeout", "3s", PropertyType.TIMEDURATION, "Time to
wait for clients to continue scans before closing a session."),
   TSERV_DEFAULT_BLOCKSIZE("tserver.default.blocksize", "1M", PropertyType.BYTES, "Specifies
a default blocksize for the tserver caches"),
-  TSERV_CACHE_FACTORY_IMPL("tserver.cache.factory.class", "org.apache.accumulo.core.file.blockfile.cache.lru.LruBlockCacheManager",
PropertyType.STRING,
+  TSERV_CACHE_MANAGER_IMPL("tserver.cache.manager.class", "org.apache.accumulo.core.file.blockfile.cache.lru.LruBlockCacheManager",
PropertyType.STRING,
       "Specifies the class name of the block cache factory implementation. Alternative implementation
is "
           + "org.apache.accumulo.core.file.blockfile.cache.tinylfu.TinyLfuBlockCacheManager"),
   TSERV_DATACACHE_SIZE("tserver.cache.data.size", "10%", PropertyType.MEMORY, "Specifies
the size of the cache for file data blocks."),

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e6d019e3/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/BlockCache.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/BlockCache.java
b/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/BlockCache.java
index dbfa294..b27c918 100644
--- a/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/BlockCache.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/BlockCache.java
@@ -54,6 +54,11 @@ public interface BlockCache {
   CacheEntry getBlock(String blockName);
 
   /**
+   * Get the maximum amount of on heap memory this cache will use.
+   */
+  long getMaxHeapSize();
+
+  /**
    * Get the maximum size of this cache.
    *
    * @return max size in bytes

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e6d019e3/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/BlockCacheConfiguration.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/BlockCacheConfiguration.java
b/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/BlockCacheConfiguration.java
index 0c07dbd..efab628 100644
--- a/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/BlockCacheConfiguration.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/BlockCacheConfiguration.java
@@ -25,6 +25,8 @@ import org.apache.accumulo.core.conf.Property;
 
 public class BlockCacheConfiguration {
 
+  public static final String CACHE_PROPERTY_BASE = Property.GENERAL_ARBITRARY_PROP_PREFIX
+ "cache.block.";
+
   /** Maximum allowable size of cache (block put if size > max, evict) */
   private final long maxSize;
 
@@ -35,7 +37,10 @@ public class BlockCacheConfiguration {
 
   private final String prefix;
 
+  private final String defaultPrefix;
+
   public BlockCacheConfiguration(AccumuloConfiguration conf, CacheType type, String implName)
{
+    defaultPrefix = getDefaultPrefix(implName);
     prefix = getPrefix(type, implName);
     genProps = conf.getAllPropertiesWithPrefix(Property.GENERAL_ARBITRARY_PROP_PREFIX);
 
@@ -64,16 +69,23 @@ public class BlockCacheConfiguration {
   }
 
   protected Optional<String> get(String suffix) {
-    return Optional.ofNullable(genProps.get(prefix + suffix));
+    String val = genProps.get(prefix + suffix);
+    if (val == null) {
+      val = genProps.get(defaultPrefix + suffix);
+    }
+    return Optional.ofNullable(val);
+  }
+
+  public static String getDefaultPrefix(String implName) {
+    return CACHE_PROPERTY_BASE + implName + ".default.";
   }
 
   public static String getPrefix(CacheType type, String implName) {
-    return BlockCacheManager.CACHE_PROPERTY_BASE + implName + "." + type.name().toLowerCase()
+ ".";
+    return CACHE_PROPERTY_BASE + implName + "." + type.name().toLowerCase() + ".";
   }
 
   @Override
   public String toString() {
     return "maxSize: " + getMaxSize() + ", blockSize: " + getBlockSize();
   }
-
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e6d019e3/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/BlockCacheManager.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/BlockCacheManager.java
b/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/BlockCacheManager.java
index 025e834..be77ee2 100644
--- a/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/BlockCacheManager.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/BlockCacheManager.java
@@ -28,8 +28,6 @@ import org.slf4j.LoggerFactory;
 
 public abstract class BlockCacheManager {
 
-  public static final String CACHE_PROPERTY_BASE = Property.GENERAL_ARBITRARY_PROP_PREFIX
+ "cache.block.";
-
   private static final Logger LOG = LoggerFactory.getLogger(BlockCacheManager.class);
 
   private final Map<CacheType,BlockCache> caches = new HashMap<>();
@@ -84,7 +82,7 @@ public abstract class BlockCacheManager {
    *           error loading block cache manager implementation class
    */
   public static synchronized BlockCacheManager getInstance(AccumuloConfiguration conf) throws
Exception {
-    String impl = conf.get(Property.TSERV_CACHE_FACTORY_IMPL);
+    String impl = conf.get(Property.TSERV_CACHE_MANAGER_IMPL);
     Class<? extends BlockCacheManager> clazz = AccumuloVFSClassLoader.loadClass(impl,
BlockCacheManager.class);
     LOG.info("Created new block cache manager of type: {}", clazz.getSimpleName());
     return (BlockCacheManager) clazz.newInstance();
@@ -100,7 +98,7 @@ public abstract class BlockCacheManager {
    *           error loading block cache manager implementation class
    */
   public static synchronized BlockCacheManager getClientInstance(AccumuloConfiguration conf)
throws Exception {
-    String impl = conf.get(Property.TSERV_CACHE_FACTORY_IMPL);
+    String impl = conf.get(Property.TSERV_CACHE_MANAGER_IMPL);
     Class<? extends BlockCacheManager> clazz = Class.forName(impl).asSubclass(BlockCacheManager.class);
     LOG.info("Created new block cache factory of type: {}", clazz.getSimpleName());
     return (BlockCacheManager) clazz.newInstance();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e6d019e3/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/lru/LruBlockCache.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/lru/LruBlockCache.java
b/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/lru/LruBlockCache.java
index 383b4d4..fa8d824 100644
--- a/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/lru/LruBlockCache.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/lru/LruBlockCache.java
@@ -380,6 +380,11 @@ public class LruBlockCache implements BlockCache, HeapSize {
   }
 
   @Override
+  public long getMaxHeapSize() {
+    return getMaxSize();
+  }
+
+  @Override
   public long getMaxSize() {
     return this.conf.getMaxSize();
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e6d019e3/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/tinylfu/TinyLfuBlockCache.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/tinylfu/TinyLfuBlockCache.java
b/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/tinylfu/TinyLfuBlockCache.java
index e76ccd9..db4e789 100644
--- a/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/tinylfu/TinyLfuBlockCache.java
+++ b/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/tinylfu/TinyLfuBlockCache.java
@@ -66,6 +66,11 @@ public final class TinyLfuBlockCache implements BlockCache {
   }
 
   @Override
+  public long getMaxHeapSize() {
+    return getMaxSize();
+  }
+
+  @Override
   public long getMaxSize() {
     return policy.getMaximum();
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e6d019e3/core/src/main/java/org/apache/accumulo/core/summary/SummaryReader.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/summary/SummaryReader.java b/core/src/main/java/org/apache/accumulo/core/summary/SummaryReader.java
index 88b1d85..daa8f22 100644
--- a/core/src/main/java/org/apache/accumulo/core/summary/SummaryReader.java
+++ b/core/src/main/java/org/apache/accumulo/core/summary/SummaryReader.java
@@ -90,6 +90,10 @@ public class SummaryReader {
       return summaryCache.getStats();
     }
 
+    @Override
+    public long getMaxHeapSize() {
+      return summaryCache.getMaxHeapSize();
+    }
   }
 
   private static List<SummarySerializer> load(BlockReader bcReader, Predicate<SummarizerConfiguration>
summarySelector) throws IOException {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e6d019e3/core/src/test/java/org/apache/accumulo/core/file/blockfile/cache/BlockCacheFactoryTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/accumulo/core/file/blockfile/cache/BlockCacheFactoryTest.java
b/core/src/test/java/org/apache/accumulo/core/file/blockfile/cache/BlockCacheFactoryTest.java
index 673382e..a28014a 100644
--- a/core/src/test/java/org/apache/accumulo/core/file/blockfile/cache/BlockCacheFactoryTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/file/blockfile/cache/BlockCacheFactoryTest.java
@@ -31,7 +31,7 @@ public class BlockCacheFactoryTest {
   public void testCreateLruBlockCacheFactory() throws Exception {
     DefaultConfiguration dc = new DefaultConfiguration();
     ConfigurationCopy cc = new ConfigurationCopy(dc);
-    cc.set(Property.TSERV_CACHE_FACTORY_IMPL, LruBlockCacheManager.class.getName());
+    cc.set(Property.TSERV_CACHE_MANAGER_IMPL, LruBlockCacheManager.class.getName());
     BlockCacheManager.getInstance(cc);
   }
 
@@ -39,7 +39,7 @@ public class BlockCacheFactoryTest {
   public void testCreateTinyLfuBlockCacheFactory() throws Exception {
     DefaultConfiguration dc = new DefaultConfiguration();
     ConfigurationCopy cc = new ConfigurationCopy(dc);
-    cc.set(Property.TSERV_CACHE_FACTORY_IMPL, TinyLfuBlockCacheManager.class.getName());
+    cc.set(Property.TSERV_CACHE_MANAGER_IMPL, TinyLfuBlockCacheManager.class.getName());
     BlockCacheManager.getInstance(cc);
   }
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e6d019e3/core/src/test/java/org/apache/accumulo/core/file/blockfile/cache/TestLruBlockCache.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/accumulo/core/file/blockfile/cache/TestLruBlockCache.java
b/core/src/test/java/org/apache/accumulo/core/file/blockfile/cache/TestLruBlockCache.java
index d3ea575..e157d35 100644
--- a/core/src/test/java/org/apache/accumulo/core/file/blockfile/cache/TestLruBlockCache.java
+++ b/core/src/test/java/org/apache/accumulo/core/file/blockfile/cache/TestLruBlockCache.java
@@ -40,12 +40,20 @@ public class TestLruBlockCache extends TestCase {
 
   public void testConfiguration() {
     ConfigurationCopy cc = new ConfigurationCopy();
-    cc.set(Property.TSERV_CACHE_FACTORY_IMPL, LruBlockCacheManager.class.getName());
+    cc.set(Property.TSERV_CACHE_MANAGER_IMPL, LruBlockCacheManager.class.getName());
     cc.set(Property.TSERV_DEFAULT_BLOCKSIZE, Long.toString(1019));
     cc.set(Property.TSERV_INDEXCACHE_SIZE, Long.toString(1000023));
 
     LruBlockCacheConfiguration.builder(CacheType.INDEX).useEvictionThread(false).minFactor(0.93f).acceptableFactor(0.97f).singleFactor(0.20f)
-        .multiFactor(0.30f).memoryFactor(0.50f).mapConcurrencyLevel(5).mapLoadFactor(0.53f).buildMap().forEach(cc::set);
+        .multiFactor(0.30f).memoryFactor(0.50f).mapConcurrencyLevel(5).buildMap().forEach(cc::set);
+
+    String defaultPrefix = BlockCacheConfiguration.getDefaultPrefix(LruBlockCacheConfiguration.PROPERTY_PREFIX);
+
+    // this should be overridden by cache type specific setting
+    cc.set(defaultPrefix + LruBlockCacheConfiguration.MEMORY_FACTOR_PROPERTY, "0.6");
+
+    // this is not set for the cache type, so should fall back to default
+    cc.set(defaultPrefix + LruBlockCacheConfiguration.MAP_LOAD_PROPERTY, "0.53");
 
     LruBlockCacheConfiguration lbcc = new LruBlockCacheConfiguration(cc, CacheType.INDEX);
 
@@ -68,7 +76,7 @@ public class TestLruBlockCache extends TestCase {
 
     DefaultConfiguration dc = new DefaultConfiguration();
     ConfigurationCopy cc = new ConfigurationCopy(dc);
-    cc.set(Property.TSERV_CACHE_FACTORY_IMPL, LruBlockCacheManager.class.getName());
+    cc.set(Property.TSERV_CACHE_MANAGER_IMPL, LruBlockCacheManager.class.getName());
     BlockCacheManager manager = BlockCacheManager.getInstance(cc);
     cc.set(Property.TSERV_DEFAULT_BLOCKSIZE, Long.toString(blockSize));
     cc.set(Property.TSERV_INDEXCACHE_SIZE, Long.toString(maxSize));
@@ -101,7 +109,7 @@ public class TestLruBlockCache extends TestCase {
 
     DefaultConfiguration dc = new DefaultConfiguration();
     ConfigurationCopy cc = new ConfigurationCopy(dc);
-    cc.set(Property.TSERV_CACHE_FACTORY_IMPL, LruBlockCacheManager.class.getName());
+    cc.set(Property.TSERV_CACHE_MANAGER_IMPL, LruBlockCacheManager.class.getName());
     BlockCacheManager manager = BlockCacheManager.getInstance(cc);
     cc.set(Property.TSERV_DEFAULT_BLOCKSIZE, Long.toString(blockSize));
     cc.set(Property.TSERV_INDEXCACHE_SIZE, Long.toString(maxSize));
@@ -158,7 +166,7 @@ public class TestLruBlockCache extends TestCase {
 
     DefaultConfiguration dc = new DefaultConfiguration();
     ConfigurationCopy cc = new ConfigurationCopy(dc);
-    cc.set(Property.TSERV_CACHE_FACTORY_IMPL, LruBlockCacheManager.class.getName());
+    cc.set(Property.TSERV_CACHE_MANAGER_IMPL, LruBlockCacheManager.class.getName());
     BlockCacheManager manager = BlockCacheManager.getInstance(cc);
     cc.set(Property.TSERV_DEFAULT_BLOCKSIZE, Long.toString(blockSize));
     cc.set(Property.TSERV_INDEXCACHE_SIZE, Long.toString(maxSize));
@@ -205,7 +213,7 @@ public class TestLruBlockCache extends TestCase {
 
     DefaultConfiguration dc = new DefaultConfiguration();
     ConfigurationCopy cc = new ConfigurationCopy(dc);
-    cc.set(Property.TSERV_CACHE_FACTORY_IMPL, LruBlockCacheManager.class.getName());
+    cc.set(Property.TSERV_CACHE_MANAGER_IMPL, LruBlockCacheManager.class.getName());
     BlockCacheManager manager = BlockCacheManager.getInstance(cc);
     cc.set(Property.TSERV_DEFAULT_BLOCKSIZE, Long.toString(blockSize));
     cc.set(Property.TSERV_INDEXCACHE_SIZE, Long.toString(maxSize));
@@ -269,7 +277,7 @@ public class TestLruBlockCache extends TestCase {
 
     DefaultConfiguration dc = new DefaultConfiguration();
     ConfigurationCopy cc = new ConfigurationCopy(dc);
-    cc.set(Property.TSERV_CACHE_FACTORY_IMPL, LruBlockCacheManager.class.getName());
+    cc.set(Property.TSERV_CACHE_MANAGER_IMPL, LruBlockCacheManager.class.getName());
     BlockCacheManager manager = BlockCacheManager.getInstance(cc);
     cc.set(Property.TSERV_DEFAULT_BLOCKSIZE, Long.toString(blockSize));
     cc.set(Property.TSERV_INDEXCACHE_SIZE, Long.toString(maxSize));
@@ -392,7 +400,7 @@ public class TestLruBlockCache extends TestCase {
 
     DefaultConfiguration dc = new DefaultConfiguration();
     ConfigurationCopy cc = new ConfigurationCopy(dc);
-    cc.set(Property.TSERV_CACHE_FACTORY_IMPL, LruBlockCacheManager.class.getName());
+    cc.set(Property.TSERV_CACHE_MANAGER_IMPL, LruBlockCacheManager.class.getName());
     BlockCacheManager manager = BlockCacheManager.getInstance(cc);
     cc.set(Property.TSERV_DEFAULT_BLOCKSIZE, Long.toString(blockSize));
     cc.set(Property.TSERV_INDEXCACHE_SIZE, Long.toString(maxSize));

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e6d019e3/core/src/test/java/org/apache/accumulo/core/file/rfile/RFileTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/accumulo/core/file/rfile/RFileTest.java b/core/src/test/java/org/apache/accumulo/core/file/rfile/RFileTest.java
index 995c369..3ed85c4 100644
--- a/core/src/test/java/org/apache/accumulo/core/file/rfile/RFileTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/file/rfile/RFileTest.java
@@ -271,7 +271,7 @@ public class RFileTest {
 
       DefaultConfiguration dc = new DefaultConfiguration();
       ConfigurationCopy cc = new ConfigurationCopy(dc);
-      cc.set(Property.TSERV_CACHE_FACTORY_IMPL, LruBlockCacheManager.class.getName());
+      cc.set(Property.TSERV_CACHE_MANAGER_IMPL, LruBlockCacheManager.class.getName());
       try {
         manager = BlockCacheManager.getInstance(cc);
       } catch (Exception e) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e6d019e3/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServerResourceManager.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServerResourceManager.java
b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServerResourceManager.java
index fc0665c..64db6ce 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServerResourceManager.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServerResourceManager.java
@@ -170,9 +170,6 @@ public class TabletServerResourceManager {
     long maxMemory = acuConf.getAsBytes(Property.TSERV_MAXMEM);
     boolean usingNativeMap = acuConf.getBoolean(Property.TSERV_NATIVEMAP_ENABLED) &&
NativeMap.isLoaded();
 
-    long dCacheSize = acuConf.getAsBytes(Property.TSERV_DATACACHE_SIZE);
-    long iCacheSize = acuConf.getAsBytes(Property.TSERV_INDEXCACHE_SIZE);
-    long sCacheSize = acuConf.getAsBytes(Property.TSERV_SUMMARYCACHE_SIZE);
     long totalQueueSize = acuConf.getAsBytes(Property.TSERV_TOTAL_MUTATION_QUEUE_MAX);
 
     try {
@@ -187,6 +184,10 @@ public class TabletServerResourceManager {
     _dCache = cacheManager.getBlockCache(CacheType.DATA);
     _sCache = cacheManager.getBlockCache(CacheType.SUMMARY);
 
+    long dCacheSize = _dCache.getMaxHeapSize();
+    long iCacheSize = _iCache.getMaxHeapSize();
+    long sCacheSize = _sCache.getMaxHeapSize();
+
     Runtime runtime = Runtime.getRuntime();
     if (usingNativeMap) {
       // Still check block cache sizes when using native maps.


Mime
View raw message