HBASE-3003 ClassSize constants dont use 'final'

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1000275 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Ryan Rawson 2010-09-22 23:49:49 +00:00
parent 17da1d0369
commit 2806d60cab
2 changed files with 23 additions and 21 deletions

View File

@ -535,6 +535,7 @@ Release 0.21.0 - Unreleased
HBASE-3023 NPE processing server crash in MetaReader. getServerUserRegions HBASE-3023 NPE processing server crash in MetaReader. getServerUserRegions
HBASE-3024 NPE processing server crash in MetaEditor.addDaughter HBASE-3024 NPE processing server crash in MetaEditor.addDaughter
HBASE-3026 Fixup of "missing" daughters on split is too aggressive HBASE-3026 Fixup of "missing" daughters on split is too aggressive
HBASE-3003 ClassSize constants dont use 'final'
IMPROVEMENTS IMPROVEMENTS
HBASE-1760 Cleanup TODOs in HTable HBASE-1760 Cleanup TODOs in HTable

View File

@ -39,64 +39,64 @@ public class ClassSize {
private static int nrOfRefsPerObj = 2; private static int nrOfRefsPerObj = 2;
/** Array overhead */ /** Array overhead */
public static int ARRAY = 0; public static final int ARRAY;
/** Overhead for ArrayList(0) */ /** Overhead for ArrayList(0) */
public static int ARRAYLIST = 0; public static final int ARRAYLIST;
/** Overhead for ByteBuffer */ /** Overhead for ByteBuffer */
public static int BYTE_BUFFER = 0; public static final int BYTE_BUFFER;
/** Overhead for an Integer */ /** Overhead for an Integer */
public static int INTEGER = 0; public static final int INTEGER;
/** Overhead for entry in map */ /** Overhead for entry in map */
public static int MAP_ENTRY = 0; public static final int MAP_ENTRY;
/** Object overhead is minimum 2 * reference size (8 bytes on 64-bit) */ /** Object overhead is minimum 2 * reference size (8 bytes on 64-bit) */
public static int OBJECT = 0; public static final int OBJECT;
/** Reference size is 8 bytes on 64-bit, 4 bytes on 32-bit */ /** Reference size is 8 bytes on 64-bit, 4 bytes on 32-bit */
public static int REFERENCE = 0; public static final int REFERENCE;
/** String overhead */ /** String overhead */
public static int STRING = 0; public static final int STRING;
/** Overhead for TreeMap */ /** Overhead for TreeMap */
public static int TREEMAP = 0; public static final int TREEMAP;
/** Overhead for ConcurrentHashMap */ /** Overhead for ConcurrentHashMap */
public static int CONCURRENT_HASHMAP = 0; public static final int CONCURRENT_HASHMAP;
/** Overhead for ConcurrentHashMap.Entry */ /** Overhead for ConcurrentHashMap.Entry */
public static int CONCURRENT_HASHMAP_ENTRY = 0; public static final int CONCURRENT_HASHMAP_ENTRY;
/** Overhead for ConcurrentHashMap.Segment */ /** Overhead for ConcurrentHashMap.Segment */
public static int CONCURRENT_HASHMAP_SEGMENT = 0; public static final int CONCURRENT_HASHMAP_SEGMENT;
/** Overhead for ConcurrentSkipListMap */ /** Overhead for ConcurrentSkipListMap */
public static int CONCURRENT_SKIPLISTMAP = 0; public static final int CONCURRENT_SKIPLISTMAP;
/** Overhead for ConcurrentSkipListMap Entry */ /** Overhead for ConcurrentSkipListMap Entry */
public static int CONCURRENT_SKIPLISTMAP_ENTRY = 0; public static final int CONCURRENT_SKIPLISTMAP_ENTRY;
/** Overhead for ReentrantReadWriteLock */ /** Overhead for ReentrantReadWriteLock */
public static int REENTRANT_LOCK = 0; public static final int REENTRANT_LOCK;
/** Overhead for AtomicLong */ /** Overhead for AtomicLong */
public static int ATOMIC_LONG = 0; public static final int ATOMIC_LONG;
/** Overhead for AtomicInteger */ /** Overhead for AtomicInteger */
public static int ATOMIC_INTEGER = 0; public static final int ATOMIC_INTEGER;
/** Overhead for AtomicBoolean */ /** Overhead for AtomicBoolean */
public static int ATOMIC_BOOLEAN = 0; public static final int ATOMIC_BOOLEAN;
/** Overhead for CopyOnWriteArraySet */ /** Overhead for CopyOnWriteArraySet */
public static int COPYONWRITE_ARRAYSET = 0; public static final int COPYONWRITE_ARRAYSET;
/** Overhead for CopyOnWriteArrayList */ /** Overhead for CopyOnWriteArrayList */
public static int COPYONWRITE_ARRAYLIST = 0; public static final int COPYONWRITE_ARRAYLIST;
private static final String THIRTY_TWO = "32"; private static final String THIRTY_TWO = "32";
@ -110,9 +110,10 @@ public class ClassSize {
String arcModel = sysProps.getProperty("sun.arch.data.model"); String arcModel = sysProps.getProperty("sun.arch.data.model");
//Default value is set to 8, covering the case when arcModel is unknown //Default value is set to 8, covering the case when arcModel is unknown
REFERENCE = 8;
if (arcModel.equals(THIRTY_TWO)) { if (arcModel.equals(THIRTY_TWO)) {
REFERENCE = 4; REFERENCE = 4;
} else {
REFERENCE = 8;
} }
OBJECT = 2 * REFERENCE; OBJECT = 2 * REFERENCE;