Merge branch '1.6' into 1.7 Conflicts: server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServerResourceManager.java
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/af21ac58 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/af21ac58 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/af21ac58 Branch: refs/heads/master Commit: af21ac58d70016965b1d0ec1d58a70e8102610eb Parents: 5960cfe 76cf943 Author: Josh Elser <els...@apache.org> Authored: Tue Dec 22 16:47:58 2015 -0500 Committer: Josh Elser <els...@apache.org> Committed: Tue Dec 22 16:47:58 2015 -0500 ---------------------------------------------------------------------- .../apache/accumulo/tserver/TabletServerResourceManager.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/accumulo/blob/af21ac58/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServerResourceManager.java ---------------------------------------------------------------------- diff --cc server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServerResourceManager.java index 65cbdf1,ccdee32..94f16ee --- a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServerResourceManager.java +++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServerResourceManager.java @@@ -167,10 -166,16 +167,16 @@@ public class TabletServerResourceManage _dCache = new LruBlockCache(dCacheSize, blockSize); Runtime runtime = Runtime.getRuntime(); - if (!usingNativeMap && maxMemory + dCacheSize + iCacheSize + totalQueueSize > runtime.maxMemory()) { + if (usingNativeMap) { + // Still check block cache sizes when using native maps. - if (dCacheSize + iCacheSize > runtime.maxMemory()) { - throw new IllegalArgumentException(String.format( - "Block cache sizes %,d is too large for this JVM configuration %,d", dCacheSize + iCacheSize, runtime.maxMemory())); ++ if (dCacheSize + iCacheSize + totalQueueSize > runtime.maxMemory()) { ++ throw new IllegalArgumentException(String.format("Block cache sizes %,d and mutation queue size %,d is too large for this JVM configuration %,d", ++ dCacheSize + iCacheSize, totalQueueSize, runtime.maxMemory())); + } - } else if (maxMemory + dCacheSize + iCacheSize > runtime.maxMemory()) { ++ } else if (maxMemory + dCacheSize + iCacheSize + totalQueueSize > runtime.maxMemory()) { throw new IllegalArgumentException(String.format( - "Maximum tablet server map memory %,d and block cache sizes %,d is too large for this JVM configuration %,d", maxMemory, dCacheSize + iCacheSize, - runtime.maxMemory())); + "Maximum tablet server map memory %,d block cache sizes %,d and mutation queue size %,d is too large for this JVM configuration %,d", maxMemory, + dCacheSize + iCacheSize, totalQueueSize, runtime.maxMemory())); } runtime.gc();