Author: nspiegelberg
Date: Thu Jan  5 02:28:43 2012
New Revision: 1227445

URL: http://svn.apache.org/viewvc?rev=1227445&view=rev
Log:
[master] Fix TestHeapSize broken by adding favored nodes to HRegion

Summary: The favored nodes field in the HRegion was not counted in the heap
size. Marking as private because the favored node code does not have JIRAs yet,
or is considered a master-only feature, as far as I know.

Test Plan: Run TestHeapSize

Reviewers: cgist

Reviewed By: cgist

CC: hbase-eng@lists, cgist

Differential Revision: 378616

Revert Plan: OK

Modified:
    
hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java

Modified: 
hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
URL: 
http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java?rev=1227445&r1=1227444&r2=1227445&view=diff
==============================================================================
--- 
hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
 (original)
+++ 
hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
 Thu Jan  5 02:28:43 2012
@@ -1531,7 +1531,7 @@ public class HRegion implements HeapSize
 
   /**
    * @return the nodes on which to place replicas of all store files, or null 
if
-   * there are no favored nodes.=
+   * there are no favored nodes.
    */
   public InetSocketAddress[] getFavoredNodes() {
     return this.favoredNodes;
@@ -3591,8 +3591,8 @@ public class HRegion implements HeapSize
   }
 
   public static final long FIXED_OVERHEAD = ClassSize.align(
-      (4 * Bytes.SIZEOF_LONG) + ClassSize.ARRAY +
-      (24 * ClassSize.REFERENCE) + ClassSize.OBJECT + Bytes.SIZEOF_INT);
+      (4 * Bytes.SIZEOF_LONG) + 2 * ClassSize.ARRAY +
+      (25 * ClassSize.REFERENCE) + ClassSize.OBJECT + Bytes.SIZEOF_INT);
 
   public static final long DEEP_OVERHEAD = ClassSize.align(FIXED_OVERHEAD +
       ClassSize.OBJECT + (2 * ClassSize.ATOMIC_BOOLEAN) +


Reply via email to