hbase-issues mailing list archives

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

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

Lars Hofhansl commented on HBASE-4752:
--------------------------------------

Hmm... The blocks are still sorted in the PriorityQueue. Could use a TreeSet with a comparator,
but the properties will be different.

The least optimization one could do is using an ArrayList and fill it from the back (the size
of the queue is known, and since PriorityQueue is not threadsafe and there is no thread synchronization
in CachedBlockQueue, I assume there is not multithreaded access here).

Strange that those tests pass, though. You do agree that with the patch the entries would
be evicted in the opposite order than before, 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: Benoit Sigoure
>            Priority: Minor
>         Attachments: 0001-HBASE-4752-Don-t-create-an-unnecessary-LinkedList-wh.patch,
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

        

Mime
View raw message