hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ramkris...@apache.org
Subject svn commit: r1187278 [3/3] - in /hbase/trunk: CHANGES.txt src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlock.java
Date Fri, 21 Oct 2011 10:11:13 GMT
Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlock.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlock.java?rev=1187278&r1=1187277&r2=1187278&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlock.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlock.java Fri Oct 21
10:11:13 2011
@@ -433,12 +433,11 @@ public class HFileBlock implements Cache
 
     // If we are on heap, then we add the capacity of buf.
     if (buf != null) {
-      return ClassSize.align(ClassSize.OBJECT + 2 * ClassSize.REFERENCE + 3
-          * Bytes.SIZEOF_INT + 2 * Bytes.SIZEOF_LONG)
-          + ClassSize.align(BYTE_BUFFER_HEAP_SIZE + buf.capacity());
+      return ClassSize.align(ClassSize.OBJECT + 3 * ClassSize.REFERENCE + 3
+          * Bytes.SIZEOF_INT + 2 * Bytes.SIZEOF_LONG + BYTE_BUFFER_HEAP_SIZE)
+          + ClassSize.align(buf.capacity());
     } else {
-
-      return ClassSize.align(ClassSize.OBJECT + 2 * ClassSize.REFERENCE + 3
+      return ClassSize.align(ClassSize.OBJECT + 3 * ClassSize.REFERENCE + 3
           * Bytes.SIZEOF_INT + 2 * Bytes.SIZEOF_LONG + BYTE_BUFFER_HEAP_SIZE);
     }
   }



Mime
View raw message