hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jg...@apache.org
Subject svn commit: r1001944 - in /hbase/trunk/src/main/java/org/apache/hadoop/hbase: KeyValue.java util/ClassSize.java
Date Mon, 27 Sep 2010 22:43:59 GMT
Author: jgray
Date: Mon Sep 27 22:43:59 2010
New Revision: 1001944

URL: http://svn.apache.org/viewvc?rev=1001944&view=rev
Log:
Attempting to fix TestHeapSize on Hudson (align array heapsize)

Modified:
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/KeyValue.java
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/util/ClassSize.java

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/KeyValue.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/KeyValue.java?rev=1001944&r1=1001943&r2=1001944&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/KeyValue.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/KeyValue.java Mon Sep 27 22:43:59 2010
@@ -1930,9 +1930,10 @@ public class KeyValue implements Writabl
   // HeapSize
   public long heapSize() {
     return ClassSize.align(ClassSize.OBJECT + (2 * ClassSize.REFERENCE) +
-        ClassSize.align(ClassSize.ARRAY + length) +
+        ClassSize.align(ClassSize.ARRAY) + ClassSize.align(length) +
         (3 * Bytes.SIZEOF_INT) +
-        ClassSize.align(ClassSize.ARRAY + (rowCache == null ? 0 : rowCache.length)) +
+        ClassSize.align(ClassSize.ARRAY) +
+        ClassSize.align((rowCache == null ? 0 : rowCache.length)) +
         (2 * Bytes.SIZEOF_LONG));
   }
 

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/util/ClassSize.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/util/ClassSize.java?rev=1001944&r1=1001943&r2=1001944&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/util/ClassSize.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/util/ClassSize.java Mon Sep 27 22:43:59
2010
@@ -118,7 +118,7 @@ public class ClassSize {
 
     OBJECT = 2 * REFERENCE;
 
-    ARRAY = 3 * REFERENCE;
+    ARRAY = align(3 * REFERENCE);
 
     ARRAYLIST = align(OBJECT + align(REFERENCE) + align(ARRAY) +
         (2 * Bytes.SIZEOF_INT));



Mime
View raw message