incubator-accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vi...@apache.org
Subject svn commit: r1222767 - /incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/tabletserver/InMemoryMap.java
Date Fri, 23 Dec 2011 17:56:03 GMT
Author: vines
Date: Fri Dec 23 17:56:03 2011
New Revision: 1222767

URL: http://svn.apache.org/viewvc?rev=1222767&view=rev
Log:
Accumulo-228 - add 4 bytes. Need ot reEvaluate getOverheadPerEntry

Modified:
    incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/tabletserver/InMemoryMap.java

Modified: incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/tabletserver/InMemoryMap.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/tabletserver/InMemoryMap.java?rev=1222767&r1=1222766&r2=1222767&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/tabletserver/InMemoryMap.java
(original)
+++ incubator/accumulo/trunk/src/server/src/main/java/org/apache/accumulo/server/tabletserver/InMemoryMap.java
Fri Dec 23 17:56:03 2011
@@ -232,7 +232,8 @@ public class InMemoryMap {
     private AtomicInteger size = new AtomicInteger();
     
     public void put(Key key, Value value) {
-      bytesInMemory.addAndGet(key.getLength());
+      // Always a MemKey, so account for the kvCount int
+      bytesInMemory.addAndGet(key.getLength() + 4);
       bytesInMemory.addAndGet(value.getSize());
       if (map.put(key, value) == null)
         size.incrementAndGet();



Mime
View raw message