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

Allan Yang commented on HBASE-21224:
------------------------------------

{code}
+        LOG.info("into longCompactions: " + store.toString());
{code}
This log is useless.
{code}
+  private synchronized  boolean handleShortCompactionDuplication(HStore store, 
HRegion region,
{code}
Double space between 'synchronized' and 'boolean'.
{code}
            //succesfully removed from shortCompactionQueue, decreasing queue 
count.
{code}
Typo in succesfully 

Add more comments on the method handleShortCompactionDuplication

[~xucang], the patch overall looks good, but I'm think of a way we can remove 
the dup compaction request in O(1) without changing the data structure. We can 
add a ConcurrentHashMap, which key is the store name + region name, value is 
the compaction request. When adding a compaction, we can first search the map 
to decide. When start compaction, the runner can delete itself from the map, 
what do you think? 

> Handle compaction queue duplication
> -----------------------------------
>
>                 Key: HBASE-21224
>                 URL: https://issues.apache.org/jira/browse/HBASE-21224
>             Project: HBase
>          Issue Type: Improvement
>          Components: Compaction
>            Reporter: Xu Cang
>            Assignee: Xu Cang
>            Priority: Minor
>         Attachments: HBASE-21224-master.001.patch, 
> HBASE-21224-master.002.patch, HBASE-21224-master.003.patch
>
>
> Mentioned by [~allan163] that we may want to handle compaction queue 
> duplication in this Jira https://issues.apache.org/jira/browse/HBASE-18451 
> Creating this item for further assessment and discussion.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to