hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Gray (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-4752) Don't create an unnecessary LinkedList when evicting from the BlockCache
Date Mon, 07 Nov 2011 18:46:52 GMT

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

Jonathan Gray commented on HBASE-4752:

Sorry I didn't chime in earlier, been traveling.

I'm actually -1 on this change at the moment because of the introduction of a Google class
(now the block cache has this external dependency).  This class is actually used by other
projects outside of HBase, so I'd hate to put in an unnecessary dependency.  Is there additional
value we get out of using the MinMaxPQ?  We save a LinkedList allocation?

As for the change in behavior, I'm not sure I follow.  Seems like nothing actually changes?
 (whether the PQ is cleared or not doesn't really matter, behavior-wise?)

The way I'm reading the code, it seems like we could actually just remove the LL completely
and leave in place the regular PQ?  CachedBlock takes care of the sort order, no?
> Don't create an unnecessary LinkedList when evicting from the BlockCache
> ------------------------------------------------------------------------
>                 Key: HBASE-4752
>                 URL: https://issues.apache.org/jira/browse/HBASE-4752
>             Project: HBase
>          Issue Type: Improvement
>          Components: performance, regionserver
>    Affects Versions: 0.90.4
>            Reporter: Benoit Sigoure
>            Assignee: Ted Yu
>            Priority: Minor
>             Fix For: 0.94.0
>         Attachments: 0001-HBASE-4752-Don-t-create-an-unnecessary-LinkedList-wh.patch,
4752-trunk-v2.txt, 4752-trunk.txt
> When evicting from the BlockCache, the code creates a LinkedList containing every single
block sorted by access time.  This list is created from a PriorityQueue.  I don't believe
it is necessary, as the PriorityQueue can be used directly.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message