hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject svn commit: r1545876 - /hbase/trunk/hbase-common/src/main/java/org/apache/hadoop/hbase/util/ClassSize.java
Date Tue, 26 Nov 2013 22:34:02 GMT
Author: apurtell
Date: Tue Nov 26 22:34:01 2013
New Revision: 1545876

URL: http://svn.apache.org/r1545876
Log:
HBASE-10032. [JDK8] ConcurrentSkipListMap class size changed

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

Modified: hbase/trunk/hbase-common/src/main/java/org/apache/hadoop/hbase/util/ClassSize.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-common/src/main/java/org/apache/hadoop/hbase/util/ClassSize.java?rev=1545876&r1=1545875&r2=1545876&view=diff
==============================================================================
--- hbase/trunk/hbase-common/src/main/java/org/apache/hadoop/hbase/util/ClassSize.java (original)
+++ hbase/trunk/hbase-common/src/main/java/org/apache/hadoop/hbase/util/ClassSize.java Tue
Nov 26 22:34:01 2013
@@ -23,6 +23,7 @@ package org.apache.hadoop.hbase.util;
 import java.lang.reflect.Field;
 import java.lang.reflect.Modifier;
 import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentSkipListMap;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -168,7 +169,8 @@ public class ClassSize {
     CONCURRENT_HASHMAP_SEGMENT = align(REFERENCE + OBJECT +
         (3 * Bytes.SIZEOF_INT) + Bytes.SIZEOF_FLOAT + ARRAY);
 
-    CONCURRENT_SKIPLISTMAP = align(Bytes.SIZEOF_INT + OBJECT + (8 * REFERENCE));
+    // The size changes from jdk7 to jdk8, estimate the size rather than use a conditional
+    CONCURRENT_SKIPLISTMAP = (int) estimateBase(ConcurrentSkipListMap.class, false);
 
     CONCURRENT_SKIPLISTMAP_ENTRY = align(
         align(OBJECT + (3 * REFERENCE)) + /* one node per entry */



Mime
View raw message