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

Eshcar Hillel commented on HBASE-15016:
---------------------------------------

As stated in the description, in future memstores size can fluctuate; when 
using alternative memory formats or due to compaction we need to take 
occasional lock and update size counters at the region level.
The goal of this issue is to come up with a StoreService entity that would be 
the bridge between any future low-level memstore needs and the services at the 
region level. We aim to make the minimal possible changes to HRegion itself.
A memstore can get a pointer to the store services object of its region at 
construction time. The store services encapsulates a (backward) pointer to the 
region.
The store services object manages any additional size counters beyond the ones 
existing in the region, and allows to acquire and release the region lock in 
exclusive mode.
The region itself can also query the store services object, e.g., to base its 
flush decision also on the data this object is managing.

In addition, we extend HStore with two methods
(1) finalizeFlush() which is invoked after the flush is completed (vs running 
prepare beforehand), each memstore type can choose to do what it sees right at 
this phase.
(2) getMemorySizeForFlushPolicy() - based on this size the memstore is selected 
(or not) to be flushed to disk, each memstore type could potentially compute 
differently the size to report.

We are working on a patch, but if you have any comments early is better than 
later :)


> StoreServices facility in Region
> --------------------------------
>
>                 Key: HBASE-15016
>                 URL: https://issues.apache.org/jira/browse/HBASE-15016
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Eshcar Hillel
>            Assignee: Eshcar Hillel
>
> The default implementation of a memstore ensures that between two flushes the 
> memstore size increases monotonically. Supporting new memstores that store 
> data in different formats (specifically, compressed), or that allows to 
> eliminate data redundancies in memory (e.g., via compaction), means that the 
> size of the data stored in memory can decrease even between two flushes. This 
> requires memstores to have access to facilities that manipulate region 
> counters and synchronization.
> This subtasks introduces a new region interface -- StoreServices, through 
> which store components can access these facilities.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to