accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vi...@apache.org
Subject svn commit: r1196031 - /incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServerResourceManager.java
Date Tue, 01 Nov 2011 14:48:39 GMT
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.");
     }
     



Mime
View raw message