hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject svn commit: r1153718 - in /hbase/trunk: CHANGES.txt src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFileBlock.java
Date Thu, 04 Aug 2011 01:20:50 GMT
Author: tedyu
Date: Thu Aug  4 01:20:49 2011
New Revision: 1153718

URL: http://svn.apache.org/viewvc?rev=1153718&view=rev
Log:
HBASE-3857  Fix TestHFileBlock.testBlockHeapSize test failure (Mikhail)

Modified:
    hbase/trunk/CHANGES.txt
    hbase/trunk/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFileBlock.java

Modified: hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/trunk/CHANGES.txt?rev=1153718&r1=1153717&r2=1153718&view=diff
==============================================================================
--- hbase/trunk/CHANGES.txt (original)
+++ hbase/trunk/CHANGES.txt Thu Aug  4 01:20:49 2011
@@ -184,6 +184,7 @@ Release 0.91.0 - Unreleased
    HBASE-4032  HBASE-451 improperly breaks public API HRegionInfo#getTableDesc
    HBASE-4148  HFileOutputFormat doesn't fill in TIMERANGE_KEY metadata (Jonathan Hsieh)
    HBASE-4003  Cleanup Calls Conservatively On Timeout (Karthick)
+   HBASE-3857  Fix TestHFileBlock.testBlockHeapSize test failure (Mikhail)
 
   IMPROVEMENTS
    HBASE-3290  Max Compaction Size (Nicolas Spiegelberg via Stack)  

Modified: hbase/trunk/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFileBlock.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFileBlock.java?rev=1153718&r1=1153717&r2=1153718&view=diff
==============================================================================
--- hbase/trunk/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFileBlock.java (original)
+++ hbase/trunk/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFileBlock.java Thu Aug
 4 01:20:49 2011
@@ -482,12 +482,16 @@ public class TestHFileBlock {
 
   @Test
   public void testBlockHeapSize() {
+    // We have seen multiple possible values for this estimate of the heap size
+    // of a ByteBuffer, presumably depending on the JDK version.
+    assertTrue(HFileBlock.BYTE_BUFFER_HEAP_SIZE == 64 ||
+               HFileBlock.BYTE_BUFFER_HEAP_SIZE == 80);
+
     for (int size : new int[] { 100, 256, 12345 }) {
       byte[] byteArr = new byte[HFileBlock.HEADER_SIZE + size];
       ByteBuffer buf = ByteBuffer.wrap(byteArr, 0, size);
       HFileBlock block = new HFileBlock(BlockType.DATA, size, size, -1, buf,
           true, -1);
-      assertEquals(80, HFileBlock.BYTE_BUFFER_HEAP_SIZE);
       long expected = ClassSize.align(ClassSize.estimateBase(HFileBlock.class,
           true)
           + ClassSize.estimateBase(buf.getClass(), true)



Mime
View raw message