HBASE-4219 Addendum for TestHFileBlock failure

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1187278 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
ramkrishna 2011-10-21 10:11:13 +00:00
parent c00dbf8139
commit 4e27946157
2 changed files with 5 additions and 4139 deletions

File diff suppressed because it is too large Load Diff

View File

@ -433,12 +433,11 @@ public class HFileBlock implements Cacheable, HFileBlockInfo {
// If we are on heap, then we add the capacity of buf.
if (buf != null) {
return ClassSize.align(ClassSize.OBJECT + 2 * ClassSize.REFERENCE + 3
* Bytes.SIZEOF_INT + 2 * Bytes.SIZEOF_LONG)
+ ClassSize.align(BYTE_BUFFER_HEAP_SIZE + buf.capacity());
return ClassSize.align(ClassSize.OBJECT + 3 * ClassSize.REFERENCE + 3
* Bytes.SIZEOF_INT + 2 * Bytes.SIZEOF_LONG + BYTE_BUFFER_HEAP_SIZE)
+ ClassSize.align(buf.capacity());
} else {
return ClassSize.align(ClassSize.OBJECT + 2 * ClassSize.REFERENCE + 3
return ClassSize.align(ClassSize.OBJECT + 3 * ClassSize.REFERENCE + 3
* Bytes.SIZEOF_INT + 2 * Bytes.SIZEOF_LONG + BYTE_BUFFER_HEAP_SIZE);
}
}