You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by vi...@apache.org on 2011/11/01 15:48:39 UTC
svn commit: r1196031 -
/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServerResourceManager.java
Author: vines
Date: Tue Nov 1 14:48:39 2011
New Revision: 1196031
URL: http://svn.apache.org/viewvc?rev=1196031&view=rev
Log:
fixes accumulo-106 - maxMemory - (totalMemory - freeMemoery) is sufficient to determine the max available memory for the tserver in order to make a more accurate judgement for the in memroy map space.
Modified:
incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServerResourceManager.java
Modified: incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServerResourceManager.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServerResourceManager.java?rev=1196031&r1=1196030&r2=1196031&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServerResourceManager.java (original)
+++ incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServerResourceManager.java Tue Nov 1 14:48:39 2011
@@ -136,7 +136,10 @@ public class TabletServerResourceManager
runtime.maxMemory()));
}
runtime.gc();
- if (!usingNativeMap && maxMemory > runtime.freeMemory()) {
+
+ // totalMemory - freeMemory = memory in use
+ // maxMemory - memory in use = max available memory
+ if (!usingNativeMap && maxMemory > runtime.maxMemory() - (runtime.totalMemory() - runtime.freeMemory())) {
log.warn("In-memory map may not fit into local memory space.");
}