Github user keith-turner commented on a diff in the pull request:
https://github.com/apache/accumulo/pull/256#discussion_r116302991
--- Diff:
server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServerResourceManager.java
---
@@ -169,25 +170,23 @@ public TabletServerResourceManager(TabletServer
tserver, VolumeManager fs) {
long maxMemory = acuConf.getAsBytes(Property.TSERV_MAXMEM);
boolean usingNativeMap =
acuConf.getBoolean(Property.TSERV_NATIVEMAP_ENABLED) && NativeMap.isLoaded();
- long blockSize = acuConf.getAsBytes(Property.TSERV_DEFAULT_BLOCKSIZE);
long dCacheSize = acuConf.getAsBytes(Property.TSERV_DATACACHE_SIZE);
--- End diff --
The sizes are used for sanity checks, but the implementation does not
necessarily have to use these properties. Also the sanity checks are only for
on heap memory. So think we may want to add something to the BlockCache
interface where we can ask it what its max heap usage will be.
```java
_iCache = cacheManager.getBlockCache(CacheType.INDEX);
_dCache = cacheManager.getBlockCache(CacheType.DATA);
_sCache = cacheManager.getBlockCache(CacheType.SUMMARY);
//use these values for heap memory over-subscription checks.
long dCacheSize = _dCache.getMaxHeapSize();
long iCacheSize = _iCache.getMaxHeapSize();
long sCacheSize = _sCache.getMaxHeapSize();
```
---
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 [email protected] or file a JIRA ticket
with INFRA.
---