hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From raw...@apache.org
Subject svn commit: r1000275 - in /hbase/trunk: CHANGES.txt src/main/java/org/apache/hadoop/hbase/util/ClassSize.java
Date Wed, 22 Sep 2010 23:49:50 GMT
Author: rawson
Date: Wed Sep 22 23:49:49 2010
New Revision: 1000275

URL: http://svn.apache.org/viewvc?rev=1000275&view=rev
Log:
HBASE-3003  ClassSize constants dont use 'final'


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

Modified: hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/trunk/CHANGES.txt?rev=1000275&r1=1000274&r2=1000275&view=diff
==============================================================================
--- hbase/trunk/CHANGES.txt (original)
+++ hbase/trunk/CHANGES.txt Wed Sep 22 23:49:49 2010
@@ -535,6 +535,7 @@ Release 0.21.0 - Unreleased
    HBASE-3023  NPE processing server crash in MetaReader. getServerUserRegions
    HBASE-3024  NPE processing server crash in MetaEditor.addDaughter
    HBASE-3026  Fixup of "missing" daughters on split is too aggressive
+   HBASE-3003  ClassSize constants dont use 'final'
 
   IMPROVEMENTS
    HBASE-1760  Cleanup TODOs in HTable

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=1000275&r1=1000274&r2=1000275&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 Wed Sep 22 23:49:49
2010
@@ -39,64 +39,64 @@ public class ClassSize {
   private static int nrOfRefsPerObj = 2;
 
   /** Array overhead */
-  public static int ARRAY = 0;
+  public static final int ARRAY;
 
   /** Overhead for ArrayList(0) */
-  public static int ARRAYLIST = 0;
+  public static final int ARRAYLIST;
 
   /** Overhead for ByteBuffer */
-  public static int BYTE_BUFFER = 0;
+  public static final int BYTE_BUFFER;
 
   /** Overhead for an Integer */
-  public static int INTEGER = 0;
+  public static final int INTEGER;
 
   /** 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) */
-  public static int OBJECT = 0;
+  public static final int OBJECT;
 
   /** 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 */
-  public static int STRING = 0;
+  public static final int STRING;
 
   /** Overhead for TreeMap */
-  public static int TREEMAP = 0;
+  public static final int TREEMAP;
 
   /** Overhead for ConcurrentHashMap */
-  public static int CONCURRENT_HASHMAP = 0;
+  public static final int CONCURRENT_HASHMAP;
 
   /** Overhead for ConcurrentHashMap.Entry */
-  public static int CONCURRENT_HASHMAP_ENTRY = 0;
+  public static final int CONCURRENT_HASHMAP_ENTRY;
 
   /** Overhead for ConcurrentHashMap.Segment */
-  public static int CONCURRENT_HASHMAP_SEGMENT = 0;
+  public static final int CONCURRENT_HASHMAP_SEGMENT;
 
   /** Overhead for ConcurrentSkipListMap */
-  public static int CONCURRENT_SKIPLISTMAP = 0;
+  public static final int CONCURRENT_SKIPLISTMAP;
 
   /** Overhead for ConcurrentSkipListMap Entry */
-  public static int CONCURRENT_SKIPLISTMAP_ENTRY = 0;
+  public static final int CONCURRENT_SKIPLISTMAP_ENTRY;
 
   /** Overhead for ReentrantReadWriteLock */
-  public static int REENTRANT_LOCK = 0;
+  public static final int REENTRANT_LOCK;
 
   /** Overhead for AtomicLong */
-  public static int ATOMIC_LONG = 0;
+  public static final int ATOMIC_LONG;
 
   /** Overhead for AtomicInteger */
-  public static int ATOMIC_INTEGER = 0;
+  public static final int ATOMIC_INTEGER;
 
   /** Overhead for AtomicBoolean */
-  public static int ATOMIC_BOOLEAN = 0;
+  public static final int ATOMIC_BOOLEAN;
 
   /** Overhead for CopyOnWriteArraySet */
-  public static int COPYONWRITE_ARRAYSET = 0;
+  public static final int COPYONWRITE_ARRAYSET;
 
   /** Overhead for CopyOnWriteArrayList */
-  public static int COPYONWRITE_ARRAYLIST = 0;
+  public static final int COPYONWRITE_ARRAYLIST;
 
   private static final String THIRTY_TWO = "32";
 
@@ -110,9 +110,10 @@ public class ClassSize {
     String arcModel = sysProps.getProperty("sun.arch.data.model");
 
     //Default value is set to 8, covering the case when arcModel is unknown
-    REFERENCE = 8;
     if (arcModel.equals(THIRTY_TWO)) {
       REFERENCE = 4;
+    } else {
+      REFERENCE = 8;
     }
 
     OBJECT = 2 * REFERENCE;



Mime
View raw message