hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Yu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-4027) Enable direct byte buffers LruBlockCache
Date Tue, 19 Jul 2011 09:57:58 GMT

    [ https://issues.apache.org/jira/browse/HBASE-4027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13067598#comment-13067598
] 

Ted Yu commented on HBASE-4027:
-------------------------------

onHeapCache should be used in getBlock():
{code}
+  /*  if ((cachedBlock = onHeapCache.getBlock(blockName, caching)) != null) {
+      return cachedBlock;
+    } else */ if ((cachedBlock = offHeapCache.getBlock(blockName, caching)) != null) {
+     // onHeapCache.cacheBlock(blockName, cachedBlock);
{code}
Otherwise onHeapCache.cacheBlock() should be commented out in:
{code}
+  public void cacheBlock(String blockName, ByteBuffer buf, boolean inMemory) {
+    onHeapCache.cacheBlock(blockName, buf, inMemory);
+    offHeapCache.cacheBlock(blockName, buf);
+  }
{code}

> Enable direct byte buffers LruBlockCache
> ----------------------------------------
>
>                 Key: HBASE-4027
>                 URL: https://issues.apache.org/jira/browse/HBASE-4027
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Jason Rutherglen
>            Assignee: Li Pi
>            Priority: Minor
>         Attachments: slabcachepatch.diff
>
>
> Java offers the creation of direct byte buffers which are allocated outside of the heap.
> They need to be manually free'd, which can be accomplished using an documented {{clean}}
method.
> The feature will be optional.  After implementing, we can benchmark for differences in
speed and garbage collection observances.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message